Changeset 1644 in MondoRescue for branches/2.2.5/mondo/src/mondorestore/mondo-rstr-compare.c
- Timestamp:
- Sep 23, 2007, 2:41:29 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mondo/src/mondorestore/mondo-rstr-compare.c
r1630 r1644 202 202 log_msg(1, tmp_ptr); 203 203 if (retval) { 204 if (!(fout = fopen( "/tmp/changed.txt", "a"))) {204 if (!(fout = fopen(MINDI_CACHE"/changed.txt", "a"))) { 205 205 fatal_error("Cannot openout changed.txt"); 206 206 } … … 381 381 if (length_of_file(logfile) > 5) { 382 382 sprintf(command, 383 "sed s/': \\\"'/\\|/ %s | sed s/'\\\": '/\\|/ | cut -d'|' -f2 | sort -u | grep -vE \"^dev/.*\" >> /tmp/changed.txt",383 "sed s/': \\\"'/\\|/ %s | sed s/'\\\": '/\\|/ | cut -d'|' -f2 | sort -u | grep -vE \"^dev/.*\" >> "MINDI_CACHE"/changed.txt", 384 384 logfile); 385 385 system(command); … … 542 542 getcwd(new, MAX_STR_LEN - 1); 543 543 insist_on_this_cd_number(bkpinfo, g_current_media_number); 544 unlink( "/tmp/changed.txt");544 unlink(MINDI_CACHE"/changed.txt"); 545 545 546 546 resA = compare_all_tarballs(bkpinfo); 547 547 resB = compare_all_biggiefiles(bkpinfo); 548 548 chdir(cwd); 549 noof_changed_files = count_lines_in_file( "/tmp/changed.txt");549 noof_changed_files = count_lines_in_file(MINDI_CACHE"/changed.txt"); 550 550 if (noof_changed_files) { 551 551 sprintf(tmp, "%ld files do not match the backup ", … … 553 553 // mvaddstr_and_log_it( g_currentY++, 0, tmp ); 554 554 log_to_screen(tmp); 555 sprintf(command, "cat /tmp/changed.txt >> %s", MONDO_LOGFILE);555 sprintf(command, "cat "MINDI_CACHE"/changed.txt >> %s", MONDO_LOGFILE); 556 556 paranoid_system(command); 557 557 } else { … … 641 641 } 642 642 643 if (count_lines_in_file( "/tmp/changed.txt") > 0) {643 if (count_lines_in_file(MINDI_CACHE"/changed.txt") > 0) { 644 644 mvaddstr_and_log_it(g_currentY++, 0, 645 645 "Differences found while files were being compared."); 646 streamline_changes_file( "/tmp/changed.files", "/tmp/changed.txt");647 if (count_lines_in_file( "/tmp/changed.files") <= 0) {646 streamline_changes_file(MINDI_CACHE"/changed.files", MINDI_CACHE"/changed.txt"); 647 if (count_lines_in_file(MINDI_CACHE"/changed.files") <= 0) { 648 648 mvaddstr_and_log_it(g_currentY++, 0, 649 649 "...but they were logfiles and temporary files. Your archives are fine."); … … 651 651 ("The differences were logfiles and temporary files. Your archives are fine."); 652 652 } else { 653 q = count_lines_in_file( "/tmp/changed.files");653 q = count_lines_in_file(MINDI_CACHE"/changed.files"); 654 654 sprintf(tmp, "%ld significant difference%s found.", q, 655 655 (q != 1) ? "s" : ""); … … 666 666 chdir(bkpinfo->restore_path); 667 667 getcwd(new, MAX_STR_LEN - 1); 668 popup_changelist_from_file( "/tmp/changed.files");668 popup_changelist_from_file(MINDI_CACHE"/changed.files"); 669 669 chdir(cwd); 670 670 log_msg(2, "Returning from popup_changelist_from_file()"); … … 723 723 res = verify_tape_backups(bkpinfo); 724 724 chdir(dir); 725 if (length_of_file( "/tmp/changed.txt") > 2726 && length_of_file( "/tmp/changed.files") > 2) {725 if (length_of_file(MINDI_CACHE"/changed.txt") > 2 726 && length_of_file(MINDI_CACHE"/changed.files") > 2) { 727 727 log_msg(0, 728 "Type 'less /tmp/changed.files' to see which files don't match the archives");728 "Type 'less "MINDI_CACHE"/changed.files' to see which files don't match the archives"); 729 729 log_msg(2, "Calling popup_changelist_from_file()"); 730 popup_changelist_from_file( "/tmp/changed.files");730 popup_changelist_from_file(MINDI_CACHE"/changed.files"); 731 731 log_msg(2, "Returned from popup_changelist_from_file()"); 732 732 }
Note:
See TracChangeset
for help on using the changeset viewer.