From 38276f3700075242ad88fa337bd227d5ac219022 Mon Sep 17 00:00:00 2001 From: maride Date: Mon, 31 Jul 2017 00:15:01 +0200 Subject: [PATCH] Add choice to wipe action --- steps/10-wipe.step | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/steps/10-wipe.step b/steps/10-wipe.step index 8f6cf9e..4e010c2 100755 --- a/steps/10-wipe.step +++ b/steps/10-wipe.step @@ -1,12 +1,20 @@ #!/bin/sh -echo -n "~> Going to wipe $blockdevice. You sure? (y/N) " +echo "~> Going to wipe $blockdevice. Just skip it if you are really sure that the drive is clean." +echo -n "~> Wipe block device? (Y/n) " +read answer + +if [ "$answer" == "n" ]; then + exit 0 +fi + +echo -n "~> You sure? (y/N) " read answer if [ "$answer" == "y" ]; then echo "~> OK. Be patient now, that could take some time..." dd if=/dev/zero of=$blockdevice status=progress - exit $? + exit 0 else exit 1 fi