You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

54 lines
1.7 KiB

# Super Grub Disk - April Fools joke starter
# Copyright (C) 2009,2010,2011,2012,2013,2014,2015 Adrian Gibanel Lopez.
#
# Super Grub Disk is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Super Grub Disk is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Super Grub Disk. If not, see <http://www.gnu.org/licenses/>.
set saved_root=$root
insmod regexp
set stupidcounter=""
set maxstupidcounter="aaaaaaaa" # Iterate 8 times
for dev in (*); do
# $device: parenthesis removed from $dev
regexp -s device '\((.*)\)' $dev
# $fstype: filesystem type identified
probe -s fstype -f $dev
# uuid: filesystem UUID
probe -s uuid -u $dev
set root=$device
echo "Do you want to wipe $device ? (Yes/No)"
sleep 2
echo "Yes"
for file in /*; do
if test -d $file ; then
echo "Deleting $file ..."
echo "Deleting $file ......"
echo "Deleting $file ........."
echo "Deleting $file ......... Completed!"
sleep 1
set stupidcounter=a$stupidcounter
if test $stupidcounter = $maxstupidcounter ; then
set root=$saved_root
configfile /boot/grub/afdmsg.cfg
fi
fi
done
done
set root=$saved_root
configfile /boot/grub/afdmsg.cfg