Commit 81ae21f6 authored by Natanael Copa's avatar Natanael Copa

setup-disk: add magic environemnt var ERASE_DISKS as confirmation

Add a magic environment variable ERASE_DISKS as confirmation for
erasing disks. This is useful for scripted installs.

fixes #2863
parent ab92d94c
......@@ -437,6 +437,10 @@ show_disk_info() {
confirm_erase() {
local answer=
local erasedisks="$@"
if [ "$ERASE_DISKS" = "$erasedisks" ]; then
reeturn 0
fi
echo "WARNING: The following disk(s) will be erased:"
show_disk_info $@
echo -n "WARNING: Erase the above disk(s) and continue? [y/N]: "
......
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