Changeset 3610 in MondoRescue for branches/3.2/mondo/src/mondorestore/mondorestore.c
- Timestamp:
- Nov 5, 2016, 6:12:23 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/mondorestore/mondorestore.c
r3564 r3610 1876 1876 log_it("Done loading config file; resizing ML"); 1877 1877 1878 mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat "CMDLINE));1878 tmp1 = call_program_and_get_last_line_of_output("cat "CMDLINE); 1879 1879 if (strstr(tmp1, "noresize")) { 1880 1880 log_msg(1, "Not resizing mountlist."); … … 2102 2102 get_cfg_file_from_archive_or_bust(); 2103 2103 load_mountlist(mountlist, g_mountlist_fname); // in case read_cfg_file_into_bkpinfo updated the mountlist 2104 #ifdef __FreeBSD__ 2105 if (strstr(call_program_and_get_last_line_of_output("cat /tmp/cmdline"), "noresize")) 2106 #else 2107 if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "noresize")) 2108 #endif 2109 { 2104 tmp = call_program_and_get_last_line_of_output("cat "CMDLINE); 2105 if (strstr(tmp, "noresize")) { 2110 2106 log_msg(2, "Not resizing mountlist."); 2111 2107 } else { 2112 2108 resize_mountlist_proportionately_to_suit_new_drives(mountlist); 2113 2109 } 2110 mr_free(tmp); 2111 2114 2112 flaws_str = evaluate_mountlist(mountlist); 2115 2113 if (flaws_str != NULL) { … … 2138 2136 twenty_seconds_til_yikes(); 2139 2137 g_fprep = fopen("/tmp/prep.sh", "w"); 2140 mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat "CMDLINE));2138 tmp1 = call_program_and_get_last_line_of_output("cat "CMDLINE); 2141 2139 if (strstr(tmp1, "nopart")) { 2142 2140 log_msg(2, "Not partitioning drives due to 'nopart' option."); … … 2204 2202 2205 2203 after_the_nuke: 2206 mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat "CMDLINE));2204 tmp1 =call_program_and_get_last_line_of_output("cat "CMDLINE); 2207 2205 if (retval) { 2208 2206 log_to_screen("Errors occurred during the nuke phase."); … … 2595 2593 2596 2594 /* Configure global variables */ 2597 #ifdef __FreeBSD__ 2598 if (strstr 2599 (call_program_and_get_last_line_of_output("cat /tmp/cmdline"), 2600 "textonly")) 2601 #else 2602 if (strstr 2603 (call_program_and_get_last_line_of_output("cat /proc/cmdline"), 2604 "textonly")) 2605 #endif 2606 { 2595 tmp = call_program_and_get_last_line_of_output("cat "CMDLINE); 2596 if (strstr(tmp, "textonly")) { 2607 2597 g_text_mode = TRUE; 2608 2598 log_msg(1, "TEXTONLY MODE"); … … 2610 2600 g_text_mode = FALSE; 2611 2601 } // newt :-) 2602 mr_free(tmp); 2603 2612 2604 if (!(mountlist = malloc(sizeof(struct mountlist_itself)))) { 2613 2605 fatal_error("Cannot malloc mountlist"); … … 2622 2614 malloc_libmondo_global_strings(); 2623 2615 2624 strcpy(g_mondo_home, 2625 call_program_and_get_last_line_of_output("which mondorestore")); 2616 tmp = call_program_and_get_last_line_of_output("which mondorestore"); 2617 strcpy(g_mondo_home, tmp); 2618 mr_free(tmp); 2619 2626 2620 g_current_media_number = 1; // precaution 2627 2628 2621 run_program_and_log_output("mkdir -p " MNT_CDROM, FALSE); 2629 2622
Note:
See TracChangeset
for help on using the changeset viewer.