Add choice to wipe action
This commit is contained in:
parent
907baf9cce
commit
38276f3700
@ -1,12 +1,20 @@
|
|||||||
#!/bin/sh
|
#!/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
|
read answer
|
||||||
|
|
||||||
if [ "$answer" == "y" ]; then
|
if [ "$answer" == "y" ]; then
|
||||||
echo "~> OK. Be patient now, that could take some time..."
|
echo "~> OK. Be patient now, that could take some time..."
|
||||||
dd if=/dev/zero of=$blockdevice status=progress
|
dd if=/dev/zero of=$blockdevice status=progress
|
||||||
exit $?
|
exit 0
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user