Changeset 1747 in MondoRescue for branches/2.2.5/mondo/src/common


Ignore:
Timestamp:
Oct 30, 2007, 1:18:55 PM (17 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
Location:
branches/2.2.5/mondo/src/common
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mondo/src/common/libmondo-archive.c

    r1713 r1747  
    40684068        log_msg(2,
    40694069                "Not verifying again. Per-CD/ISO verification already carried out.");
    4070         sprintf(tmp, "cat %s/changed.files > %s/changed.files 2> /dev/null",bkpinfo->tmpdir, MINDI_CACHE);
     4070        sprintf(tmp, "cat %s/changed.files > %s/changed.files 2> /dev/null",bkpinfo->tmpdir, MONDO_CACHE);
    40714071        paranoid_system(tmp);
    40724072    } else {
     
    41054105        sprintf(tmp,
    41064106                "grep 'afio: ' %s | sed 's/afio: //' | grep -vE '^/dev/.*$' >> %s/changed.files",
    4107                 MONDO_LOGFILE, MINDI_CACHE);
     4107                MONDO_LOGFILE, MONDO_CACHE);
    41084108        system(tmp);
    41094109
    41104110        sprintf(tmp,
    41114111                "grep 'star: ' %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> %s/changed.files",
    4112                 MONDO_LOGFILE, MINDI_CACHE);
     4112                MONDO_LOGFILE, MONDO_CACHE);
    41134113        system(tmp);
    41144114        run_program_and_log_output("umount " MNT_CDROM, FALSE);
     
    41184118//}
    41194119    }
    4120     sprintf(tmp, "%s/changed.files", MINDI_CACHE);
     4120    sprintf(tmp, "%s/changed.files", MONDO_CACHE);
    41214121    diffs = count_lines_in_file(tmp);
    41224122
  • branches/2.2.5/mondo/src/common/libmondo-filelist.c

    r1668 r1747  
    16871687                       char *userdef_filelist)
    16881688{
    1689     char sz_datefile_wildcard[] = "/var/cache/mondo-archive/difflevel.%d";
     1689    char sz_datefile_wildcard[] = MONDO_CACHE"/difflevel.%d";
    16901690    char *p, *q;
    16911691    char sz_datefile[80];
     
    17531753        snprintf(exclude_paths, (size_t)8*MAX_STR_LEN," %s %s %s %s %s %s . .. \
    17541754" MNT_CDROM " " MNT_FLOPPY " /media \
    1755 /proc /sys /root/images/mondo " MINDI_CACHE, excp, call_program_and_get_last_line_of_output("locate /win386.swp 2> /dev/null"), call_program_and_get_last_line_of_output("locate /hiberfil.sys 2> /dev/null"), call_program_and_get_last_line_of_output("locate /pagefile.sys 2> /dev/null"), (tmpdir[0] == '/' && tmpdir[1] == '/') ? (tmpdir + 1) : tmpdir, (scratchdir[0] == '/' && scratchdir[1] == '/') ? (scratchdir + 1) : scratchdir);
     1755/proc /sys /root/images/mondo " MINDI_CACHE, MONDO_CACHE, excp, call_program_and_get_last_line_of_output("locate /win386.swp 2> /dev/null"), call_program_and_get_last_line_of_output("locate /hiberfil.sys 2> /dev/null"), call_program_and_get_last_line_of_output("locate /pagefile.sys 2> /dev/null"), (tmpdir[0] == '/' && tmpdir[1] == '/') ? (tmpdir + 1) : tmpdir, (scratchdir[0] == '/' && scratchdir[1] == '/') ? (scratchdir + 1) : scratchdir);
    17561756
    17571757        log_msg(2, "Excluding paths = '%s'", exclude_paths);
  • branches/2.2.5/mondo/src/common/libmondo-files.c

    r1645 r1747  
    12761276            ("Unable to find ethN (eth0, eth1, ...) adapter via NFS mount you specified.");
    12771277    }
    1278     make_hole_for_dir("/var/cache/mondo-archive");
    12791278    /********
    12801279    * If the NFS device that found above is a bonded device,
  • branches/2.2.5/mondo/src/common/libmondo-tools.c

    r1744 r1747  
    938938
    939939    unlink(MONDO_TRACEFILE);
    940     asprintf(&tmp,"rm -Rf %s/changed.files*",MINDI_CACHE);
     940    asprintf(&tmp,"rm -Rf %s/changed.files*",MONDO_CACHE);
    941941    run_program_and_log_output(tmp, FALSE);
    942942    paranoid_free(tmp);
     
    11311131    }
    11321132#endif
    1133 
    1134     Lres = free_space_on_given_partition(MINDI_CACHE);
    1135     log_it("Free space on partition of %s = %ld MB", MINDI_CACHE, Lres);
    1136 
    1137     if (Lres < 50) {
    1138         sprintf(tmp, "The partition of %s has <50MB free. Please free up space or enlarge the partition or make %s a symbolic link.", MINDI_CACHE, MINDI_CACHE);
    1139         fatal_error(tmp);
    1140     }
    11411133
    11421134    if (system("which " MKE2FS_OR_NEWFS " > /dev/null 2> /dev/null")) {
  • branches/2.2.5/mondo/src/common/libmondo-verify.c

    r1711 r1747  
    13251325    if (diffs > 0) {
    13261326        sprintf(tmp, "cp -f %s %s/changed.files", changed_files_fname,
    1327                 MINDI_CACHE);
     1327                MONDO_CACHE);
    13281328        run_program_and_log_output(tmp, FALSE);
    13291329        sprintf(tmp,
    13301330                "%ld files differed from live filesystem; type less %s or less %s/changed.files to see",
    1331                 diffs, changed_files_fname, MINDI_CACHE);
     1331                diffs, changed_files_fname, MONDO_CACHE);
    13321332        log_msg(0, tmp);
    1333         log_to_screen("See "MINDI_CACHE"/changed.files for a list of nonmatching files.");
     1333        log_to_screen("See "MONDO_CACHE"/changed.files for a list of nonmatching files.");
    13341334        log_to_screen("The files probably changed on filesystem, not on backup media.");
    13351335        //      retval++;
  • branches/2.2.5/mondo/src/common/my-stuff.h

    r1688 r1747  
    235235 */
    236236#define MINDI_CACHE "/var/cache/mindi"
     237
     238/**
     239 * The location where mondo changed info are stored.
     240 */
     241#define MONDO_CACHE "/var/cache/mondo"
    237242
    238243/**
  • branches/2.2.5/mondo/src/common/newt-specific.c

    r1713 r1747  
    433433
    434434        printf("---FATALERROR--- %s\n", error_string);
    435         sprintf(command, "gzip -9c %s > %s/MA.log.gz 2> /dev/null", MONDO_LOGFILE, MINDI_CACHE);
     435        sprintf(command, "gzip -9c %s > %s/MA.log.gz 2> /dev/null", MONDO_LOGFILE, MONDO_CACHE);
    436436        system(command);
    437437        printf
     
    441441                ("The list's members can help you, if you attach that file to your e-mail.\n");
    442442        printf("Log file: %s\n", MONDO_LOGFILE);
    443         if (does_file_exist(MINDI_CACHE"/MA.log.gz")) {
    444             printf("FYI, I have gzipped the log and saved it to "MINDI_CACHE"/MA.log.gz.\n");
     443        if (does_file_exist(MONDO_CACHE"/MA.log.gz")) {
     444            printf("FYI, I have gzipped the log and saved it to "MONDO_CACHE"/MA.log.gz.\n");
    445445        }
    446446        printf("Mondo has aborted.\n");
Note: See TracChangeset for help on using the changeset viewer.