Ignore:
Timestamp:
Nov 6, 2007, 1:37:38 AM (12 years ago)
Author:
Bruno Cornec
Message:

Continue on configuration file items (compression)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c

    r1663 r1769  
    891891    }
    892892
    893     read_cfg_var(cfg_file, "use-lzo", value);
     893    /* BERLIOS: This has now to be re-written with conf file */
     894    read_cfg_var(cfg_file, "use-comp", value);
    894895    if (strstr(value, "yes")) {
    895         bkpinfo->use_lzo = TRUE;
    896         bkpinfo->use_gzip = FALSE;
    897         strcpy(bkpinfo->zip_exe, "lzop");
    898         strcpy(bkpinfo->zip_suffix, "lzo");
    899     } else {
    900         read_cfg_var(cfg_file, "use-gzip", value);
    901         if (strstr(value, "yes")) {
    902             bkpinfo->use_lzo = FALSE;
    903             bkpinfo->use_gzip = TRUE;
    904             strcpy(bkpinfo->zip_exe, "gzip");
    905             strcpy(bkpinfo->zip_suffix, "gz");
    906         } else {
    907             read_cfg_var(cfg_file, "use-comp", value);
    908             if (strstr(value, "yes")) {
    909                 bkpinfo->use_lzo = FALSE;
    910                 bkpinfo->use_gzip = FALSE;
    911                 strcpy(bkpinfo->zip_exe, "bzip2");
    912                 strcpy(bkpinfo->zip_suffix, "bz2");
    913             } else {
    914                 bkpinfo->zip_exe[0] = bkpinfo->zip_suffix[0] = '\0';
    915             }
    916         }
     896        read_cfg_var(cfg_file, "compression_tool", value);
     897        mr_asprintf(&(bkpinfo->compression_tool), value);
     898        read_cfg_var(cfg_file, "compression_suffix", value);
     899        mr_asprintf(&(bkpinfo->compression_suffix), "bz2");
     900    } else {
     901        bkpinfo->compression_tool = NULL;
     902        bkpinfo->compression_suffix = NULL;
    917903    }
    918904
Note: See TracChangeset for help on using the changeset viewer.