Changeset 2320 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-archive.c
- Timestamp:
- Aug 18, 2009, 2:37:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-archive.c
r2318 r2320 337 337 mr_asprintf(&zipparams, ""); 338 338 } 339 340 // make_hole_for_file(fname);341 339 342 340 if (!does_file_exist(bkpinfo->tmpdir)) { … … 543 541 544 542 assert(bkpinfo != NULL); 545 mr_asprintf(&tmp, "echo '%s' | tr -s ' ' '\n' | grep -E '^/dev/.*$' | tr -s '\n' ' ' | awk '{print $0\"\\n\";}'", bkpinfo->exclude_paths); 546 mr_asprintf(&devs_to_exclude, "%s", call_program_and_get_last_line_of_output(tmp)); 547 mr_free(tmp); 548 549 mr_asprintf(&tmp, "devs_to_exclude = '%s'", devs_to_exclude); 550 log_msg(2, tmp); 551 mr_free(tmp); 543 if (bkpinfo->exclude_paths) { 544 mr_asprintf(&tmp, "echo '%s' | tr -s ' ' '\n' | grep -E '^/dev/.*$' | tr -s '\n' ' ' | awk '{print $0\"\\n\";}'", bkpinfo->exclude_paths); 545 mr_asprintf(&devs_to_exclude, "%s", call_program_and_get_last_line_of_output(tmp)); 546 mr_free(tmp); 547 548 mr_asprintf(&tmp, "devs_to_exclude = '%s'", devs_to_exclude); 549 log_msg(2, tmp); 550 mr_free(tmp); 551 } 552 552 553 553 mvaddstr_and_log_it(g_currentY, 0, … … 885 885 last_filelist_number, // parameter #12 (STRING) 886 886 estimated_total_noof_slices, // parameter #13 (INT) 887 devs_to_exclude, // parameter #14887 (devs_to_exclude == NULL) ? "\"\"" : devs_to_exclude, // parameter #14 888 888 use_comp_sz, // parameter #15 889 889 use_lilo_sz, // parameter #16 … … 920 920 if (!res) { 921 921 log_to_screen("Boot+data disks were created OK"); 922 mr_asprintf(&command, "cp -f %s/images/mindi.iso %s/mondorescue.iso", 923 bkpinfo->scratchdir, MINDI_CACHE); 922 mr_asprintf(&command, "cp -f %s/images/mindi.iso %s/mondorescue.iso", bkpinfo->scratchdir, MINDI_CACHE); 924 923 log_msg(2, command); 925 924 run_program_and_log_output(command, FALSE); … … 927 926 928 927 if (bkpinfo->nonbootable_backup) { 929 mr_asprintf(&command, "cp -f %s/all.tar.gz %s/images", 930 bkpinfo->tmpdir, bkpinfo->scratchdir); 928 mr_asprintf(&command, "cp -f %s/all.tar.gz %s/images", bkpinfo->tmpdir, bkpinfo->scratchdir); 931 929 if (system(command)) { 932 930 paranoid_free(command); … … 941 939 paranoid_free(command); 942 940 } else { 943 mr_asprintf(&tmp, "cp -f %s/images/all.tar.gz %s", bkpinfo->scratchdir, 944 bkpinfo->tmpdir); 941 mr_asprintf(&tmp, "cp -f %s/images/all.tar.gz %s", bkpinfo->scratchdir, bkpinfo->tmpdir); 945 942 if (system(tmp)) { 946 943 fatal_error("Cannot find all.tar.gz in tmpdir"); … … 1689 1686 } 1690 1687 1691 log_msg(2, "make_iso_fs --- scratchdir=%s --- destfile=%s", 1692 bkpinfo->scratchdir, destfile); 1688 log_msg(2, "make_iso_fs --- scratchdir=%s --- destfile=%s", bkpinfo->scratchdir, destfile); 1693 1689 (void) getcwd(old_pwd, MAX_STR_LEN - 1); 1694 1690 mr_asprintf(&tmp, "chmod 755 %s", bkpinfo->scratchdir); … … 1727 1723 } else { 1728 1724 res = 1729 eval_call_to_make_ISO(bkpinfo->call_make_iso, 1730 bkpinfo->scratchdir, 1731 g_current_media_number, 1732 MONDO_LOGFILE, message_to_screen); 1725 eval_call_to_make_ISO(bkpinfo->call_make_iso, bkpinfo->scratchdir, g_current_media_number, MONDO_LOGFILE, message_to_screen); 1733 1726 if (res) { 1734 1727 log_to_screen("%s...failed to write", message_to_screen); … … 1789 1782 pause_for_N_seconds(5, "Letting DVD drive settle"); 1790 1783 res = 1791 eval_call_to_make_ISO(bkpinfo->call_make_iso, 1792 bkpinfo->scratchdir, 1793 g_current_media_number, 1794 MONDO_LOGFILE, 1795 message_to_screen); 1784 eval_call_to_make_ISO(bkpinfo->call_make_iso, bkpinfo->scratchdir, g_current_media_number, MONDO_LOGFILE, message_to_screen); 1796 1785 retval += res; 1797 1786 if (!bkpinfo->please_dont_eject) { … … 2378 2367 if (g_getfattr) { 2379 2368 get_fattr_list(biggielist, xattr_fname); 2380 mr_asprintf(&command, "cp %s %s/archives/", xattr_fname, 2381 bkpinfo->scratchdir); 2369 mr_asprintf(&command, "cp %s %s/archives/", xattr_fname, bkpinfo->scratchdir); 2382 2370 paranoid_system(command); 2383 2371 mr_free(command); … … 3302 3290 paranoid_fclose(fout); 3303 3291 3304 mr_asprintf(&tmp1, "cp -f %s/autorun %s/", g_mondo_home, 3305 bkpinfo->scratchdir); 3292 mr_asprintf(&tmp1, "cp -f %s/autorun %s/", g_mondo_home, bkpinfo->scratchdir); 3306 3293 if (run_program_and_log_output(tmp1, FALSE)) { 3307 3294 log_msg(2, "Warning - unable to copy autorun to scratchdir");
Note:
See TracChangeset
for help on using the changeset viewer.