2 if [ -f formatscript ]; then
5 cat >formatscript <<END_OF_DATA
8 # Format all partitions on disk $disk -- created by getdiskinfo
11 echo "This script will format all partitions on disk $disk."
13 echo "IT WILL DESTROY ALL DATA ON DISK $disk !!!!"
15 if [ ! -f noprompt ];then
16 echo -n "Are you sure you want to continue? yes/no: "
18 if [ x\$a != xyes ] ; then
22 if [ ! -f badblocksnoprompt ];then
23 echo "Do you want to do a disk check for bad blocks?"
24 echo -n "It is recommended, but takes time. yes/no: "
26 if [ x\$a = xyes ] ; then
40 formatscripto=`ls working/scripts |grep $dis|grep format`
42 cat working/scripts/$formatscripto |grep $disk|while read line;do
43 echo $line >>formatscript
46 grep mk formatscript>>/dev/null 2>&1
48 cat formatscript>>formatallscript