Changeset 2296 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-verify.c
- Timestamp:
- Jul 23, 2009, 2:53:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-verify.c
r2276 r2296 107 107 108 108 log_msg(1, "Now scanning log file for 'star: ' stuff"); 109 mr_asprintf(&command, 110 "grep \"star: \" %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> %s", 111 stderr_fname, afio_found_changes); 109 mr_asprintf(&command, "grep \"star: \" %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> %s", stderr_fname, afio_found_changes); 112 110 log_msg(2, command); 113 111 res = system(command); … … 118 116 } 119 117 afio_diffs = count_lines_in_file(afio_found_changes); 120 mr_asprintf(&command, 121 "sort %s %s %s | uniq -c | awk '{ if ($1==\"2\") {print $2;};}' | grep -v \"incheckentry xwait()\" > %s", 122 ignorefiles_fname, afio_found_changes, afio_found_changes, 123 changedfiles_fname); 118 mr_asprintf(&command, "sort %s %s %s | uniq -c | awk '{ if ($1==\"2\") {print $2;};}' | grep -v \"incheckentry xwait()\" > %s", ignorefiles_fname, afio_found_changes, afio_found_changes, changedfiles_fname); 124 119 mr_free(afio_found_changes); 125 120 log_msg(2, command); … … 172 167 } else { 173 168 retval++; 174 mr_asprintf(&tmp, "Warning - missing set(s) between %d and %d\n", 175 g_last_afioball_number, set_number - 1); 169 mr_asprintf(&tmp, "Warning - missing set(s) between %d and %d\n", g_last_afioball_number, set_number - 1); 176 170 log_to_screen(tmp); 177 171 mr_free(tmp); … … 342 336 g_current_media_number, bigfile_num, slice_num); 343 337 if (!does_file_exist(slice_fname(bigfile_num, slice_num, mountpoint, ""))) { 344 mr_asprintf(&command, "%s -dc %s 2>> %s", 345 sz_exe, 346 slice_fname(bigfile_num, slice_num, mountpoint, bkpinfo->zip_suffix), 347 MONDO_LOGFILE); 338 mr_asprintf(&command, "%s -dc %s 2>> %s", sz_exe, slice_fname(bigfile_num, slice_num, mountpoint, bkpinfo->zip_suffix), MONDO_LOGFILE); 348 339 } else { 349 340 mr_asprintf(&command, "cat %s 2>> %s", slice_fname(bigfile_num, slice_num, mountpoint, ""), MONDO_LOGFILE); … … 474 465 bkpinfo->use_star = TRUE; 475 466 if (strstr(tarball_fname, ".bz2")) 476 mr_asprintf(&command, 477 "star -diff diffopts=mode,size,data file=%s %s >> %s 2>> %s", 478 tarball_fname, 479 (strstr(tarball_fname, ".bz2")) ? "-bz" : " ", outlog, 480 outlog); 467 mr_asprintf(&command, "star -diff diffopts=mode,size,data file=%s -bz >> %s 2>> %s", tarball_fname, outlog, outlog); 481 468 } else { 482 469 bkpinfo->use_star = FALSE; 483 mr_asprintf(&command, "afio -r -P %s -Z %s >> %s 2>> %s", 484 bkpinfo->zip_exe, tarball_fname, outlog, outlog); 470 mr_asprintf(&command, "afio -r -P %s -Z %s >> %s 2>> %s", bkpinfo->zip_exe, tarball_fname, outlog, outlog); 485 471 } 486 472 log_msg(6, "command=%s", command); … … 491 477 mr_asprintf(&command, "cat %s >> %s", outlog, MONDO_LOGFILE); 492 478 } else { 493 mr_asprintf(&command, "cut -d: -f%d %s | sort -u", 494 (bkpinfo->use_star) ? 1 : 2, outlog); 479 mr_asprintf(&command, "cut -d: -f%d %s | sort -u", (bkpinfo->use_star) ? 1 : 2, outlog); 495 480 pin = popen(command, "r"); 496 481 if (pin) { … … 794 779 res = verify_an_afioball_from_stream(fname, size); 795 780 if (res) { 796 mr_asprintf(&tmp, "Afioball %ld differs from live filesystem", 797 current_afioball_number); 781 mr_asprintf(&tmp, "Afioball %ld differs from live filesystem", current_afioball_number); 798 782 log_to_screen(tmp); 799 783 mr_free(tmp); … … 897 881 p++; 898 882 } 899 mr_asprintf(&comment, "Verifying bigfile #%ld (%ld K)", 900 current_biggiefile_number, (long) size >> 10); 883 mr_asprintf(&comment, "Verifying bigfile #%ld (%ld K)", current_biggiefile_number, (long) size >> 10); 901 884 update_progress_form(comment); 902 885 mr_free(comment); … … 1208 1191 diffs = count_lines_in_file(changed_files_fname); 1209 1192 if (diffs > 0) { 1210 mr_asprintf(&tmp, "cp -f %s %s/changed.files", changed_files_fname, 1211 MONDO_CACHE); 1193 mr_asprintf(&tmp, "cp -f %s %s/changed.files", changed_files_fname, MONDO_CACHE); 1212 1194 run_program_and_log_output(tmp, FALSE); 1213 1195 mr_free(tmp);
Note:
See TracChangeset
for help on using the changeset viewer.