Changeset 1043 in MondoRescue for trunk/mondo/src/mondorestore


Ignore:
Timestamp:
Jan 8, 2007, 11:31:22 PM (17 years ago)
Author:
Bruno Cornec
Message:

merge -r978:1042 $SVN_M/branches/stable

Location:
trunk/mondo/src/mondorestore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/src/mondorestore/mondo-restore.c

    r973 r1043  
    10021002    char *outfile_fname = NULL;
    10031003    char *tmp = NULL;
     1004    char *tmp0 = NULL;
    10041005    char *tmp1 = NULL;
    10051006    char *tmp2 = NULL;
     
    11571158    for (sliceno = 1, finished = FALSE; !finished;) {
    11581159        tmp = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, "");
     1160        tmp0 = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, "gz");
    11591161        tmp1 = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, "lzo");
    11601162        tmp2 = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, "bz2");
    1161         if (!does_file_exist(tmp) && !does_file_exist(tmp1) &&
     1163        if (!does_file_exist(tmp) &&
     1164            !does_file_exist(tmp0) &&
     1165            !does_file_exist(tmp1) &&
    11621166            !does_file_exist(tmp2)) {
    11631167            log_msg(3,
     
    11901194                if (does_file_exist(tmp1)) {
    11911195                    mr_asprintf(&bzip2_command, "lzop -dc %s 2>> %s",tmp1, MONDO_LOGFILE);
     1196                } else if (does_file_exist(tmp0)) {
     1197                    mr_asprintf(&bzip2_command, "gzip -dc %s 2>> %s",tmp0, MONDO_LOGFILE);
    11921198                } else if (does_file_exist(tmp2)) {
    11931199                        mr_asprintf(&bzip2_command, "bzip2 -dc %s 2>> %s",tmp2, MONDO_LOGFILE);
     
    16161622        if (strstr(tarball_fname, ".bz2")) {
    16171623            mr_asprintf(&executable, "bzip2");
     1624        } else if (strstr(tarball_fname, ".gz")) {
     1625            strcpy(executable, "gzip");
     1626        } else if (strstr(tarball_fname, ".gz")) {
     1627            strcpy(executable, "gzip");
    16181628        } else if (strstr(tarball_fname, ".lzo")) {
    16191629            mr_asprintf(&executable, "lzop");
  • trunk/mondo/src/mondorestore/mondo-rstr-compare.c

    r900 r1043  
    241241    if (strstr(tarball_fname, ".bz2")) {
    242242        mr_asprintf(&compressor_exe, "bzip2");
     243    } else if (strstr(tarball_fname, ".gz")) {
     244        strcpy(compressor_exe, "gzip");
     245    } else if (strstr(tarball_fname, ".gz")) {
     246        strcpy(compressor_exe, "gzip");
    243247    } else if (strstr(tarball_fname, ".lzo")) {
    244248        mr_asprintf(&compressor_exe, "lzop");
  • trunk/mondo/src/mondorestore/mondo-rstr-tools.c

    r972 r1043  
    952952        mr_allocstr(bkpinfo->zip_exe, "lzop");
    953953        mr_allocstr(bkpinfo->zip_suffix, "lzo");
     954        bkpinfo->use_gzip = FALSE;
    954955    } else {
    955956        mr_free(value);
    956         read_cfg_var(cfg_file, "use-comp", value);
     957        read_cfg_var(cfg_file, "use-gzip", value);
    957958        if (strstr(value, "yes")) {
    958959            bkpinfo->use_lzo = FALSE;
    959             mr_allocstr(bkpinfo->zip_exe, "bzip2");
    960             mr_allocstr(bkpinfo->zip_suffix, "bz2");
     960            bkpinfo->use_gzip = TRUE;
     961            mr_allocstr(bkpinfo->zip_exe, "gzip");
     962            mr_allocstr(bkpinfo->zip_suffix, "gz");
    961963        } else {
    962             // Just to be sure
    963             bkpinfo->zip_exe = NULL;
    964             bkpinfo->zip_suffix = NULL;
     964            read_cfg_var(cfg_file, "use-comp", value);
     965            if (strstr(value, "yes")) {
     966                bkpinfo->use_lzo = FALSE;
     967                bkpinfo->use_gzip = FALSE;
     968                mr_allocstr(bkpinfo->zip_exe, "bzip2");
     969                mr_allocstr(bkpinfo->zip_suffix, "bz2");
     970            } else {
     971                // Just to be sure
     972                bkpinfo->zip_exe = NULL;
     973                bkpinfo->zip_suffix = NULL;
     974            }
    965975        }
    966976    }
Note: See TracChangeset for help on using the changeset viewer.