Ignore:
Timestamp:
Oct 30, 2007, 1:18:55 PM (16 years ago)
Author:
Bruno Cornec
Message:
  • Solve problem on tmpfs in restore init (Problem of inexistant symlink and busybox)
  • Create MONDO_CACHE and use it everywhere + creation at start
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mondo/src/mondorestore/mondo-rstr-compare.c

    r1664 r1747  
    207207    log_msg(1, tmp_ptr);
    208208    if (retval) {
    209         if (!(fout = fopen(MINDI_CACHE"/changed.txt", "a"))) {
     209        if (!(fout = fopen(MONDO_CACHE"/changed.txt", "a"))) {
    210210            fatal_error("Cannot openout changed.txt");
    211211        }
     
    384384    if (length_of_file(logfile) > 5) {
    385385        sprintf(command,
    386                 "sed s/': \\\"'/\\|/ %s | sed s/'\\\": '/\\|/ | cut -d'|' -f2 | sort -u | grep -vE \"^dev/.*\" >> "MINDI_CACHE"/changed.txt",
     386                "sed s/': \\\"'/\\|/ %s | sed s/'\\\": '/\\|/ | cut -d'|' -f2 | sort -u | grep -vE \"^dev/.*\" >> "MONDO_CACHE"/changed.txt",
    387387                logfile);
    388388        system(command);
     
    545545    getcwd(new, MAX_STR_LEN - 1);
    546546    insist_on_this_cd_number(g_current_media_number);
    547     unlink(MINDI_CACHE"/changed.txt");
     547    unlink(MONDO_CACHE"/changed.txt");
    548548
    549549    resA = compare_all_tarballs();
    550550    resB = compare_all_biggiefiles();
    551551    chdir(cwd);
    552     noof_changed_files = count_lines_in_file(MINDI_CACHE"/changed.txt");
     552    noof_changed_files = count_lines_in_file(MONDO_CACHE"/changed.txt");
    553553    if (noof_changed_files) {
    554554        sprintf(tmp, "%ld files do not match the backup            ",
     
    556556        //      mvaddstr_and_log_it( g_currentY++, 0, tmp );
    557557        log_to_screen(tmp);
    558         sprintf(command, "cat "MINDI_CACHE"/changed.txt >> %s", MONDO_LOGFILE);
     558        sprintf(command, "cat "MONDO_CACHE"/changed.txt >> %s", MONDO_LOGFILE);
    559559        paranoid_system(command);
    560560    } else {
     
    662662    }
    663663
    664     if (count_lines_in_file(MINDI_CACHE"/changed.txt") > 0) {
     664    if (count_lines_in_file(MONDO_CACHE"/changed.txt") > 0) {
    665665        mvaddstr_and_log_it(g_currentY++, 0,
    666666                            "Differences found while files were being compared.");
    667         streamline_changes_file(MINDI_CACHE"/changed.files", MINDI_CACHE"/changed.txt");
    668         if (count_lines_in_file(MINDI_CACHE"/changed.files") <= 0) {
     667        streamline_changes_file(MONDO_CACHE"/changed.files", MONDO_CACHE"/changed.txt");
     668        if (count_lines_in_file(MONDO_CACHE"/changed.files") <= 0) {
    669669            mvaddstr_and_log_it(g_currentY++, 0,
    670670                                "...but they were logfiles and temporary files. Your archives are fine.");
     
    672672                ("The differences were logfiles and temporary files. Your archives are fine.");
    673673        } else {
    674             q = count_lines_in_file(MINDI_CACHE"/changed.files");
     674            q = count_lines_in_file(MONDO_CACHE"/changed.files");
    675675            sprintf(tmp, "%ld significant difference%s found.", q,
    676676                    (q != 1) ? "s" : "");
     
    687687            chdir(bkpinfo->restore_path);
    688688            getcwd(new, MAX_STR_LEN - 1);
    689             popup_changelist_from_file(MINDI_CACHE"/changed.files");
     689            popup_changelist_from_file(MONDO_CACHE"/changed.files");
    690690            chdir(cwd);
    691691            log_msg(2, "Returning from popup_changelist_from_file()");
     
    744744    res = verify_tape_backups();
    745745    chdir(dir);
    746     if (length_of_file(MINDI_CACHE"/changed.txt") > 2
    747         && length_of_file(MINDI_CACHE"/changed.files") > 2) {
     746    if (length_of_file(MONDO_CACHE"/changed.txt") > 2
     747        && length_of_file(MONDO_CACHE"/changed.files") > 2) {
    748748        log_msg(0,
    749                 "Type 'less "MINDI_CACHE"/changed.files' to see which files don't match the archives");
     749                "Type 'less "MONDO_CACHE"/changed.files' to see which files don't match the archives");
    750750        log_msg(2, "Calling popup_changelist_from_file()");
    751         popup_changelist_from_file(MINDI_CACHE"/changed.files");
     751        popup_changelist_from_file(MONDO_CACHE"/changed.files");
    752752        log_msg(2, "Returned from popup_changelist_from_file()");
    753753    }
Note: See TracChangeset for help on using the changeset viewer.