arch-maride-flavour/steps/10-wipe.step
2018-03-05 14:22:08 +01:00

22 lines
508 B
Bash
Executable File

#!/bin/sh
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" ] || [ "$answer" == "N" ]; then
amf_return=0
else
echo -n "~> You sure? (y/N) "
read answer
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
echo "~> OK. Be patient now, that could take some time..."
dd if=/dev/zero of=$blockdevice status=progress
amf_return=0
else
amf_return=1
fi
fi
return $amf_return