Changeset 818 in MondoRescue
- Timestamp:
- Sep 23, 2006, 11:10:46 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/mondo/mondorestore/mondo-restore.c
r812 r818 1119 1119 if (ask_me_yes_or_no(tmp)) { 1120 1120 retval = interactive_mode(bkpinfo, mountlist, raidlist); 1121 finish(retval);1121 goto after_the_nuke; 1122 1122 } else { 1123 1123 fatal_error("Nuke Mode aborted. "); … … 1227 1227 ("Please visit our website at http://www.mondorescue.org for more information."); 1228 1228 } else { 1229 strcpy(tmp," Mondo has restored your system. Pleaseremove the backup media and reboot.\n\nPlease visit our website at http://www.mondorescue.org for more information.");1229 strcpy(tmp,"Mondo has restored your system.\n\nPlease wait for the command prompt. Then remove the backup media and reboot.\n\nPlease visit our website at http://www.mondorescue.org for more information."); 1230 1230 if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "restore") == NULL) { 1231 1231 popup_and_OK(tmp); 1232 1232 } 1233 1233 log_to_screen 1234 ("Mondo has restored your system. Please remove the backup media and reboot."); 1234 ("Mondo has restored your system. Please wait for the command prompt."); 1235 log_to_screen 1236 ("Then remove the backup media and reboot."); 1235 1237 log_to_screen 1236 1238 ("Please visit our website at http://www.mondorescue.org for more information."); … … 3198 3200 struct s_node *filelist; 3199 3201 char *a, *b; 3202 bool run_postnuke = FALSE; 3200 3203 3201 3204 /************************************************************************** … … 3606 3609 3607 3610 // g_I_have_just_nuked is set true by nuke_mode() just before it returns 3608 if (g_I_have_just_nuked || does_file_exist("/POST-NUKE-ANYWAY")) { 3609 if (!system("which post-nuke > /dev/null 2> /dev/null")) { 3610 log_msg(1, "post-nuke found; running..."); 3611 if (mount_all_devices(mountlist, TRUE)) { 3612 log_to_screen 3613 ("Unable to re-mount partitions for post-nuke stuff"); 3614 } else { 3615 log_msg(1, "Re-mounted partitions for post-nuke stuff"); 3616 sprintf(tmp, "post-nuke %s %d", bkpinfo->restore_path, 3617 retval); 3618 if (!g_text_mode) { 3619 newtSuspend(); 3620 } 3621 log_msg(2, "Calling '%s'", tmp); 3622 if ((res = system(tmp))) { 3623 log_OS_error(tmp); 3624 } 3625 if (!g_text_mode) { 3626 newtResume(); 3627 } 3628 // newtCls(); 3629 log_msg(1, "post-nuke returned w/ res=%d", res); 3630 } 3631 unmount_all_devices(mountlist); 3632 log_msg(1, "I've finished post-nuking."); 3633 } 3634 } 3611 if (!system("which post-nuke > /dev/null 2> /dev/null")) { 3612 log_msg(1, "post-nuke found; find out whether we should run it..."); 3613 if (g_I_have_just_nuked || does_file_exist("/POST-NUKE-ANYWAY")) { 3614 run_postnuke = TRUE; 3615 log_msg(1, "Yes, will run post-nuke because in nuke mode or file /POST-NUKE-ANYWAY exists."); 3616 } else if (ask_me_yes_or_no("post-nuke script found. Do you want to run it?")) { 3617 run_postnuke = TRUE; 3618 log_msg(1, "Yes, will run post-nuke because user interactively asked for it."); 3619 } else { 3620 run_postnuke = FALSE; 3621 log_msg(1, "No, will not run post-nuke."); 3622 } 3623 } else { 3624 log_msg(1, "No post-nuke found."); 3625 } 3626 if (run_postnuke) { 3627 log_to_screen("Running post-nuke..."); 3628 if (mount_all_devices(mountlist, TRUE)) { 3629 log_to_screen 3630 ("Unable to re-mount partitions for post-nuke stuff"); 3631 } else { 3632 log_msg(1, "Re-mounted partitions for post-nuke stuff"); 3633 sprintf(tmp, "post-nuke %s %d", bkpinfo->restore_path, 3634 retval); 3635 log_msg(2, "Calling '%s'", tmp); 3636 if ((res = run_program_and_log_output(tmp, 0))) { 3637 log_OS_error(tmp); 3638 } 3639 log_msg(1, "post-nuke returned w/ res=%d", res); 3640 } 3641 unmount_all_devices(mountlist); 3642 log_to_screen("I've finished post-nuking."); 3643 } 3644 3635 3645 /* 3636 3646 log_to_screen("If you are REALLY in a hurry, hit Ctrl-Alt-Del now.");
Note:
See TracChangeset
for help on using the changeset viewer.