Changeset 3610 in MondoRescue for branches/3.2/mondo/src/mondorestore/mondo-rstr-tools.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/mondo-rstr-tools.c
r3601 r3610 695 695 strcpy(bkpinfo->prefix,STD_PREFIX); 696 696 } 697 if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "pxe")) { 697 tmp1 = call_program_and_get_last_line_of_output("cat "CMDLINE); 698 if (strstr(tmp1, "pxe")) { 698 699 /* We need to override prefix value in PXE mode as it's 699 700 * already done in start-netfs */ … … 704 705 strcpy(bkpinfo->prefix,envtmp1); 705 706 } 707 mr_free(tmp1); 706 708 } else if (!strcmp(value, "tape")) { 707 709 bkpinfo->backup_media_type = tape; … … 832 834 833 835 read_cfg_var(cfg_file, "please-dont-eject", value); 834 if (value[0] || strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "donteject")) { 836 tmp1 = call_program_and_get_last_line_of_output("cat "CMDLINE); 837 if (value[0] || strstr(tmp1, "donteject")) { 835 838 bkpinfo->please_dont_eject = TRUE; 836 839 log_msg(2, "Ok, I shan't eject when restoring! Groovy."); 837 840 } 841 mr_free(tmp1); 838 842 839 843 /* TODO: Read here the boot_* variables */ … … 881 885 } 882 886 } 883 if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "pxe")) { 887 tmp1 = call_program_and_get_last_line_of_output("cat "CMDLINE); 888 if (strstr(tmp1, "pxe")) { 884 889 /* We need to override values in PXE mode as it's 885 890 * already done in start-netfs */ … … 898 903 mr_asprintf(bkpinfo->netfs_remote_dir, "%s", envtmp2); 899 904 } 905 mr_free(tmp1); 900 906 } else if (bkpinfo->backup_media_type == iso) { 901 907 /* Patch by Conor Daly 23-june-2004 … … 932 938 mr_asprintf(command, "mount | grep -E '^%s' | tail -n1 | cut -d' ' -f3", g_isodir_device); 933 939 log_it("command = %s", command); 934 log_it("res of it = %s", call_program_and_get_last_line_of_output(command)); 935 sprintf(iso_mnt, "%s", call_program_and_get_last_line_of_output(command)); 940 tmp1 = call_program_and_get_last_line_of_output(command); 941 log_it("res of it = %s", tmp1); 942 sprintf(iso_mnt, "%s", tmp1); 936 943 mr_free(command); 944 mr_free(tmp1); 937 945 } else { 938 946 sprintf(iso_mnt, "/tmp/isodir"); … … 2064 2072 char *cfg_file = NULL; 2065 2073 char *tmp = NULL; 2074 char *tmp1 = NULL; 2066 2075 char *mountpt = NULL; 2067 2076 char *mountlist_file = NULL; … … 2177 2186 if (does_file_exist(MONDO_CFG_FILE_STUB)) { 2178 2187 log_msg(1, "gcffa --- great! We've got the config file"); 2179 mr_asprintf(tmp, "%s/%s", call_program_and_get_last_line_of_output("pwd"), MONDO_CFG_FILE_STUB); 2188 tmp1 = call_program_and_get_last_line_of_output("pwd"); 2189 mr_asprintf(tmp, "%s/%s", tmp1, MONDO_CFG_FILE_STUB); 2180 2190 mr_asprintf(command, "cp -f %s %s", tmp, cfg_file); 2181 2191 log_it("%s",command); … … 2189 2199 mr_free(command); 2190 2200 2191 mr_asprintf(command, "cp -f %s/%s %s", call_program_and_get_last_line_of_output("pwd"), MOUNTLIST_FNAME_STUB, mountlist_file); 2201 mr_asprintf(command, "cp -f %s/%s %s", tmp1, MOUNTLIST_FNAME_STUB, mountlist_file); 2202 mr_free(tmp1); 2192 2203 log_it("%s",command); 2193 2204 if (extract_mountlist_stub) {
Note:
See TracChangeset
for help on using the changeset viewer.