Commit 4bbe2168 authored by Dennis Baurichter's avatar Dennis Baurichter
Browse files

bootstrap: Without --allow-disk-wipe just ask for confirmation

parent 25c27a40
......@@ -39,6 +39,7 @@ while [[ $# -gt 0 ]]; do
echo " Repeatable. Specify target path relative to target system's /"
echo " --allow-disk-wipe"
echo " Allow the script to wipe the disk and proceed with the installation."
echo " Without this option the user will be asked interactively for confirmation."
echo " --kernel-param PARAMETER"
echo " Add PARAMETER to EFI kernel command line."
echo " --vm"
......@@ -158,16 +159,19 @@ if [ -n "$raid_action" -a "$bios" = false ]; then
>&2 echo "This combination is currently NOT tested and may or may not work."
>&2 echo "Known bug: Multiple EFI system partitions are created, but only one populated (that is, if you're lucky and nothing else breaks before that)."
>&2 echo "(For redundancy in case of disk failure you might want to copy grubx64.efi as EFI/BOOT/BOOTX64.EFI onto all ESPs or something...)"
>&2 read -p answer "Continue anyway? [yN] "
>&2 read -r -p answer "Continue anyway? [yN] "
if [ "y" != "$answer" ]; then
exit 1
fi
fi
if [ "$wipe" != true ]; then
>&2 echo "disk wiping not allowed. cannot proceed."
>&2 echo "use --allow-disk-wipe to proceed"
exit 1
echo "This script will wipe some or all data on the following disks:"
lsblk -o name,size,type,fstype,label,mountpoint "${devices[@]}"
read -r -p "Allow wiping data? [yN] " answer
if [ "y" != "$answer" ]; then
exit 1
fi
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment