arch-maride-flavour/steps/10-wipe.step

21 lines
458 B
Plaintext
Raw Normal View History

#!/bin/sh
2017-07-30 22:15:01 +00:00
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
2017-08-07 16:02:57 +00:00
if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
2017-07-30 22:15:01 +00:00
exit 0
fi
echo -n "~> You sure? (y/N) "
read answer
2017-08-07 16:02:57 +00:00
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
echo "~> OK. Be patient now, that could take some time..."
dd if=/dev/zero of=$blockdevice status=progress
2017-07-30 22:15:01 +00:00
exit 0
else
exit 1
fi