Changeset 2329 in MondoRescue for branches/2.2.10/mondo
- Timestamp:
- Aug 18, 2009, 3:20:46 PM (15 years ago)
- Location:
- branches/2.2.10/mondo/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-devices.c
r2328 r2329 732 732 733 733 if (found_it) { 734 mr_asprintf(tmp1, "grep \"%s=ide-scsi\" /proc/cmdline&> /dev/null", strrchr(output, '/') + 1);734 mr_asprintf(tmp1, "grep \"%s=ide-scsi\" " CMDLINE " &> /dev/null", strrchr(output, '/') + 1); 735 735 if (system(tmp1) == 0) { 736 736 log_msg(4, "%s is not right. It's being SCSI-emulated. Continuing.", output); -
branches/2.2.10/mondo/src/common/libmondo-tools.c
r2328 r2329 745 745 } 746 746 g_current_media_number = 1; 747 bkpinfo->postnuke_tarball[0] = '\0';748 747 return (res); 749 748 } -
branches/2.2.10/mondo/src/include/my-stuff.h
r2237 r2329 93 93 */ 94 94 #define MONDO_TRACEFILE "/var/log/mondo-tracefile.log" 95 96 #ifdef __FreeBSD__ 97 #define CMDLINE "/tmp/cmdline" 98 #else 99 // Default Linux 100 #define CMDLINE "/proc/cmdline" 101 #endif 95 102 96 103 #undef assert -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.c
r2327 r2329 784 784 } 785 785 786 if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "pxe")) {786 if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "pxe")) { 787 787 /* We need to override prefix value in PXE mode as it's 788 788 * already done in start-nfs */ … … 948 948 949 949 tmp = read_cfg_var(g_mondo_cfg_file, "please-dont-eject"); 950 if (tmp || strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "donteject")) {950 if (tmp || strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "donteject")) { 951 951 bkpinfo->please_dont_eject = TRUE; 952 952 log_msg(2, "Ok, I shan't eject when restoring! Groovy."); … … 977 977 } 978 978 } 979 if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "pxe")) {979 if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "pxe")) { 980 980 /* We need to override values in PXE mode as it's 981 981 * already done in start-nfs */ -
branches/2.2.10/mondo/src/mondorestore/mondorestore.c
r2327 r2329 471 471 log_it("Done loading config file; resizing ML"); 472 472 473 #ifdef __FreeBSD__ 474 if (strstr(call_program_and_get_last_line_of_output("cat /tmp/cmdline"), "noresize")) 475 #else 476 if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "noresize")) 477 #endif 478 { 473 if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "noresize")) { 479 474 log_msg(1, "Not resizing mountlist."); 480 475 } else { … … 773 768 get_cfg_file_from_archive_or_bust(); 774 769 load_mountlist(mountlist, g_mountlist_fname); // in case read_cfg_file_into_bkpinfo updated the mountlist 775 #ifdef __FreeBSD__ 776 if (strstr 777 (call_program_and_get_last_line_of_output("cat /tmp/cmdline"), 778 "noresize")) 779 #else 780 if (strstr 781 (call_program_and_get_last_line_of_output("cat /proc/cmdline"), 782 "noresize")) 783 #endif 784 { 770 if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "noresize")) { 785 771 log_msg(2, "Not resizing mountlist."); 786 772 } else { … … 811 797 twenty_seconds_til_yikes(); 812 798 g_fprep = fopen("/tmp/prep.sh", "w"); 813 #ifdef __FreeBSD__ 814 if (strstr 815 (call_program_and_get_last_line_of_output 816 ("cat /tmp/cmdline"), "nopart")) 817 #else 818 if (strstr 819 (call_program_and_get_last_line_of_output 820 ("cat /proc/cmdline"), "nopart")) 821 #endif 822 { 799 if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "nopart")) { 823 800 log_msg(2, 824 801 "Not partitioning drives due to 'nopart' option."); … … 894 871 if (retval) { 895 872 log_to_screen("Errors occurred during the nuke phase."); 896 } else if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "RESTORE")) {873 } else if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "RESTORE")) { 897 874 log_to_screen 898 875 ("PC was restored successfully. Thank you for using Mondo Rescue."); … … 2667 2644 /* Configure global variables */ 2668 2645 malloc_libmondo_global_strings(); 2669 #ifdef __FreeBSD__ 2670 if (strstr(call_program_and_get_last_line_of_output("cat /tmp/cmdline"), "textonly")) 2671 #else 2672 if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "textonly")) 2673 #endif 2646 if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "textonly")) 2674 2647 { 2675 2648 g_text_mode = TRUE;
Note:
See TracChangeset
for help on using the changeset viewer.