Created
July 23, 2012 23:16
-
-
Save kfatehi/3166865 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function wipe_it() { | |
echo "Alright, here we go. ZEROING EVERYTHING" | |
echo "Yeah right, execute this yourself: sudo dd if=/dev/zero of=/dev/mapper/sick-root bs=1M" | |
} | |
function confirm_it() { | |
read -n1 -p "Are you absolutely SURE you want to zero the drive? (y/n): " | |
echo | |
[[ $REPLY = [yY] ]] && wipe_it || { echo "Bailing!"; exit 1; } | |
} | |
read -n1 -p "Really wipe everything? (y/n): " | |
echo | |
[[ $REPLY = [yY] ]] && confirm_it || { echo "Bailing!"; exit 1; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment