Changeset 2383 in MondoRescue for branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.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/mondo-rstr-tools.c
r2382 r2383 756 756 } 757 757 758 if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "pxe")) { 758 tmp = call_program_and_get_last_line_of_output("cat " CMDLINE); 759 if (strstr(tmp, "pxe")) { 759 760 /* We need to override prefix value in PXE mode as it's 760 761 * already done in start-netfs */ … … 766 767 mr_asprintf(bkpinfo->prefix, "%s", envtmp1); 767 768 } 769 mr_free(tmp); 768 770 769 771 } else if (!strcmp(value, "tape")) { … … 939 941 940 942 tmp = read_cfg_var(g_mondo_cfg_file, "please-dont-eject"); 941 if (tmp || strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "donteject")) { 943 tmp1 = call_program_and_get_last_line_of_output("cat " CMDLINE); 944 if (tmp || strstr(tmp1, "donteject")) { 942 945 bkpinfo->please_dont_eject = TRUE; 943 946 log_msg(2, "Ok, I shan't eject when restoring! Groovy."); 944 947 } 945 948 mr_free(tmp); 949 mr_free(tmp1); 946 950 947 951 if (bkpinfo->backup_media_type == netfs) { … … 971 975 } 972 976 } 973 if (strstr(call_program_and_get_last_line_of_output("cat " CMDLINE), "pxe")) { 977 tmp1 = call_program_and_get_last_line_of_output("cat " CMDLINE); 978 if (strstr(tmp1, "pxe")) { 979 mr_free(tmp1); 974 980 /* We need to override values in PXE mode as it's 975 981 * already done in start-netfs */ … … 987 993 mr_free(bkpinfo->netfs_remote_dir); 988 994 mr_asprintf(bkpinfo->netfs_remote_dir, "%s", envtmp2); 989 } 995 } else { 996 mr_free(tmp1); 997 } 998 990 999 } else if (bkpinfo->backup_media_type == iso) { 991 1000 /* Patch by Conor Daly 23-june-2004 … … 1025 1034 mr_asprintf(command, "mount | grep -E '^%s' | tail -n1 | cut -d' ' -f3", g_isodir_device); 1026 1035 log_it("command = %s", command); 1027 log_it("res of it = %s", call_program_and_get_last_line_of_output(command));1028 mr_asprintf(iso_mnt, "%s", call_program_and_get_last_line_of_output(command));1036 iso_mnt = call_program_and_get_last_line_of_output(command); 1037 log_it("res of it = %s", iso_mnt); 1029 1038 mr_free(command); 1030 1039 } else { … … 2174 2183 char *mounted_cfgf_path; 2175 2184 char *tmp = NULL; 2185 char *tmp1 = NULL; 2176 2186 char *mountpt = NULL; 2177 2187 char *ramdisk_fname; … … 2290 2300 if (does_file_exist(MONDO_CFG_FILE_STUB)) { 2291 2301 log_msg(1, "gcffa --- great! We've got the config file"); 2292 mr_asprintf(tmp, "%s/%s", call_program_and_get_last_line_of_output("pwd"), MONDO_CFG_FILE_STUB); 2302 tmp = call_program_and_get_last_line_of_output("pwd"); 2303 mr_strcat(tmp, "/%s", MONDO_CFG_FILE_STUB); 2293 2304 mr_asprintf(command, "cp -f %s %s", tmp, cfg_file); 2294 2305 log_it("%s",command); … … 2300 2311 mr_free(command); 2301 2312 2302 mr_asprintf(command, "cp -f %s/%s %s", call_program_and_get_last_line_of_output("pwd"), 2303 MOUNTLIST_FNAME_STUB, mountlist_file); 2313 tmp1 = call_program_and_get_last_line_of_output("pwd"); 2314 mr_asprintf(command, "cp -f %s/%s %s", tmp1, MOUNTLIST_FNAME_STUB, mountlist_file); 2315 mr_free(tmp1); 2316 2304 2317 log_it("%s",command); 2305 2318 if (extract_mountlist_stub) {
Note:
See TracChangeset
for help on using the changeset viewer.