Changeset 2326 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-verify.c
- Timestamp:
- Aug 18, 2009, 3:19:54 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-verify.c
r2325 r2326 204 204 * - @c restore_path 205 205 * - @c use_lzo 206 * - @c zip_exe207 206 * - @c zip_suffix 208 207 * @param mtpt The mountpoint the CD/DVD/ISO is mounted on. … … 432 431 mr_asprintf(outlog, "%s/afio.log", bkpinfo->tmpdir); 433 432 /* if programmer forgot to say which compression thingy to use then find out */ 434 if (strstr(tarball_fname, ".lzo") 435 && strcmp(bkpinfo->zip_suffix, "lzo")) { 433 if (strstr(tarball_fname, ".lzo") && strcmp(bkpinfo->zip_suffix, "lzo")) { 436 434 log_msg(2, "OK, I'm going to start using lzop."); 437 strcpy(bkpinfo->zip_exe, "lzop"); 435 mr_free(bkpinfo->zip_exe); 436 mr_asprintf(bkpinfo->zip_exe, "lzop"); 438 437 strcpy(bkpinfo->zip_suffix, "lzo"); 439 438 bkpinfo->use_lzo = TRUE; 440 439 bkpinfo->use_gzip = FALSE; 441 440 } 442 if (strstr(tarball_fname, ".gz") 443 && strcmp(bkpinfo->zip_suffix, "gz")) { 441 if (strstr(tarball_fname, ".gz") && strcmp(bkpinfo->zip_suffix, "gz")) { 444 442 log_msg(2, "OK, I'm going to start using gzip."); 445 strcpy(bkpinfo->zip_exe, "gzip"); 443 mr_free(bkpinfo->zip_exe); 444 mr_asprintf(bkpinfo->zip_exe, "gzip"); 446 445 strcpy(bkpinfo->zip_suffix, "gz"); 447 446 bkpinfo->use_lzo = FALSE; 448 447 bkpinfo->use_gzip = TRUE; 449 448 } 450 if (strstr(tarball_fname, ".bz2") 451 && strcmp(bkpinfo->zip_suffix, "bz2")) { 449 if (strstr(tarball_fname, ".bz2") && strcmp(bkpinfo->zip_suffix, "bz2")) { 452 450 log_msg(2, "OK, I'm going to start using bzip2."); 453 strcpy(bkpinfo->zip_exe, "bzip2"); 451 mr_free(bkpinfo->zip_exe); 452 mr_asprintf(bkpinfo->zip_exe, "bzip2"); 454 453 strcpy(bkpinfo->zip_suffix, "bz2"); 455 454 bkpinfo->use_lzo = FALSE; … … 463 462 } else { 464 463 bkpinfo->use_star = FALSE; 465 mr_asprintf(command, "afio -r -P %s -Z %s >> %s 2>> %s", bkpinfo->zip_exe, tarball_fname, outlog, outlog); 464 /* Here we suppose that there is always a compression program called */ 465 if (bkpinfo->zip_exe) { 466 mr_asprintf(command, "afio -r -P %s -Z %s >> %s 2>> %s", bkpinfo->zip_exe, tarball_fname, outlog, outlog); 467 } else { 468 mr_asprintf(command, "afio -r -Z %s >> %s 2>> %s", tarball_fname, outlog, outlog); 469 } 466 470 } 467 471 log_msg(6, "command=%s", command);
Note:
See TracChangeset
for help on using the changeset viewer.