Changeset 2383 in MondoRescue for branches/2.2.10/mondo/src/mondorestore/mondorestore.c
- Timestamp:
- Sep 10, 2009, 2:55:51 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/mondorestore/mondorestore.c
r2382 r2383 470 470 log_it("Done loading config file; resizing ML"); 471 471 472 if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "noresize")) { 472 tmp1 = call_program_and_get_last_line_of_output("cat " CMDLINE); 473 if (strstr(tmp1, "noresize")) { 473 474 log_msg(1, "Not resizing mountlist."); 474 475 } else { 475 476 resize_mountlist_proportionately_to_suit_new_drives(mountlist); 476 477 } 478 mr_free(tmp1); 479 477 480 for (done = FALSE; !done;) { 478 481 log_it("About to edit mountlist"); … … 750 753 int res = 0; 751 754 bool boot_loader_installed = FALSE; 752 /** malloc **/753 755 char *tmp = NULL; 756 char *tmp1 = NULL; 754 757 char *flaws_str = NULL; 755 758 … … 762 765 get_cfg_file_from_archive_or_bust(); 763 766 load_mountlist(mountlist, g_mountlist_fname); // in case read_cfg_file_into_bkpinfo updated the mountlist 764 if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "noresize")) { 767 768 tmp = call_program_and_get_last_line_of_output("cat " CMDLINE); 769 if (strstr(tmp, "noresize")) { 765 770 log_msg(2, "Not resizing mountlist."); 766 771 } else { 767 772 resize_mountlist_proportionately_to_suit_new_drives(mountlist); 768 773 } 774 mr_free(tmp); 775 769 776 flaws_str = evaluate_mountlist(mountlist, &res); 770 777 if (!res) { … … 795 802 twenty_seconds_til_yikes(); 796 803 g_fprep = fopen("/tmp/prep.sh", "w"); 797 if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "nopart")) {798 log_msg(2,799 804 tmp = call_program_and_get_last_line_of_output("cat " CMDLINE); 805 if (strstr(tmp, "nopart")) { 806 log_msg(2, "Not partitioning drives due to 'nopart' option."); 800 807 res = 0; 801 808 } else { 802 809 res = partition_everything(mountlist); 803 810 if (res) { 804 log_to_screen 805 ("Warning. Errors occurred during partitioning."); 811 log_to_screen("Warning. Errors occurred during partitioning."); 806 812 res = 0; 807 813 } 808 814 } 815 mr_free(tmp); 816 809 817 retval += res; 810 818 if (!res) { … … 867 875 868 876 after_the_nuke: 877 tmp1 = call_program_and_get_last_line_of_output("cat " CMDLINE); 869 878 if (retval) { 870 879 log_to_screen("Errors occurred during the nuke phase."); 871 } else if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "RESTORE")) { 872 log_to_screen 873 ("PC was restored successfully. Thank you for using Mondo Rescue."); 874 log_to_screen 875 ("Please visit our website at http://www.mondorescue.org for more information."); 880 } else if (tmp1, "RESTORE")) { 881 log_to_screen("PC was restored successfully. Thank you for using Mondo Rescue."); 882 log_to_screen("Please visit our website at http://www.mondorescue.org for more information."); 876 883 } else { 877 884 mr_asprintf(tmp,"%s","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."); … … 882 889 log_to_screen("Please visit our website at http://www.mondorescue.org for more information."); 883 890 } 891 mr_free(tmp1); 892 884 893 g_I_have_just_nuked = TRUE; 885 894 return (retval); … … 2618 2627 /* Configure global variables */ 2619 2628 malloc_libmondo_global_strings(); 2620 if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "textonly"))2621 {2629 tmp1 = call_program_and_get_last_line_of_output("cat " CMDLINE); 2630 if (strstr(tmp1, "textonly")) { 2622 2631 g_text_mode = TRUE; 2623 2632 log_msg(1, "TEXTONLY MODE"); … … 2625 2634 g_text_mode = FALSE; 2626 2635 } // newt :-) 2636 mr_free(tmp1); 2627 2637 2628 2638 /* Init GUI */ 2629 2639 setup_newt_stuff(); /* call newtInit and setup screen log */ 2630 2640 2631 strcpy(g_mondo_home, call_program_and_get_last_line_of_output("which mondorestore")); 2641 tmp1 = call_program_and_get_last_line_of_output("which mondorestore"); 2642 strcpy(g_mondo_home, tmp1); 2643 mr_free(tmp1); 2644 2632 2645 g_current_media_number = 1; // precaution 2633 2646
Note:
See TracChangeset
for help on using the changeset viewer.