confirm off set string diskstr = getenv("mc_restore_disk") set string clearstr = getenv("mc_disk_clear") select disk 1 if ( stringscaseequal(string(diskstr),"0") ) then select disk 0 endif if ( stringscaseequal(string(diskstr),"2") ) then select disk 2 endif if ( stringscaseequal(string(diskstr),"3") ) then select disk 3 endif //delete all the partitions if ( stringsequal(string(clearstr),"on") ) then delete all call check_error apply all call check_error endif // Exiting exit(0) // Function for checking error check_error: if (errorcode(1) != 0) then print "Some error occured: " strerror(errorcode(1)) print "" print "Exiting" print "" exit(errorcode(1)) endif endcall