#! /bin/sh echo Content-Type: text/html echo reboot=`echo $QUERY_STRING | sed -ne '/reboot=/{s/.*reboot=\([^&;]*\).*/\1/;p}'` if test "x$reboot" = x; then : else sudo /sbin/reboot fi device=`echo $QUERY_STRING | sed -ne 's/\%2F/\//g' -ne '/device=/{s/.*device=\([^&;]*\).*/\1/;p}'` passwd=`echo $QUERY_STRING | sed -ne '/passwd=/{s/.*passwd=\([^&;]*\).*/\1/;p}'` cat < Reformatting your hard disk for ERP5
 

EOF if test -f /mnt/erp5_cd/.erp5cd; then cat <Your hard disk has been reformatted already.

EOF elif test "x$device" = x; then cat <You can reformat your hard disk to use the whole disk for ERP5. This is prefereable for production systems, because of better performance and flexibility.

Caution: This operation will trash all the contents on your hard disk, including the existing installation of your operating system. Make sure that you take a complete backup of your hard disk before reformatting the disk, if you have any important data in the disk.

Please choose which disk device should be reformatted and input the password (which is available from the file "readme.txt" in the CDROM):


Disk Device:
Password:
 
EOF elif test "x$passwd" = "xokdelete"; then sudo /usr/sbin/erp5cd_reformat $device >> /tmp/reformat.log 2>&1 a=$? echo $a if test $a -eq 0; then cat <The disk has been reformatted successfully.

EOF else cat <Sorry, an error happened while reformatting your hard disk. Your system is unusable now. Please restore your system by the backup you made.

EOF fi cat <Click here to reboot.

EOF else cat <The password is wrong.

EOF fi cat <
EOF