Changeset 3867 in MondoRescue for branches/3.3/mondo/src/common/libmondo-tools.c
- Timestamp:
- Mar 7, 2024, 2:56:52 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mondo/src/common/libmondo-tools.c
r3856 r3867 14 14 #include "mondostructures.h" 15 15 #include "lib-common-externs.h" 16 #include "libmondo-tools.h"17 16 #include "libmondo-gui-EXT.h" 18 17 #include "libmondo-files-EXT.h" … … 436 435 437 436 if (bkpinfo->backup_media_type == dvd) { 438 if (find_home_of_exe("growisofs")) { 439 mr_asprintf(cdr_exe, "growisofs"); 440 } // unlikely to be used 441 else { 437 if ((cdr_exe = find_home_of_exe("growisofs")) == NULL) { 442 438 fatal_error("Please install growisofs."); 443 439 } … … 462 458 mondo_mkisofs_sz = mr_compute_uefi_string(cdr_exe); 463 459 } 460 mr_free(cdr_exe); 461 464 462 if (bkpinfo->manual_cd_tray) { 465 463 fatal_error("Manual CD tray + DVD not supported yet."); … … 496 494 mr_asprintf(extra_cdrom_params, " "); 497 495 } 498 if (find_home_of_exe("cdrecord")) { 499 mr_asprintf(cdr_exe, "cdrecord"); 500 } else if (find_home_of_exe("dvdrecord")) { 501 mr_asprintf(cdr_exe, "dvdrecord"); 496 if ((cdr_exe = find_home_of_exe("cdrecord")) == NULL) { 497 if ((cdr_exe = find_home_of_exe("wodim")) == NULL) { 498 if ((cdr_exe = find_home_of_exe("dvdrecord")) == NULL) { 499 fatal_error("Please install either cdrecord, wodim or dvdrecord."); 500 } 501 } 502 } 503 if ((tmp = find_home_of_exe("xorriso")) != NULL) { 504 mr_asprintf(isofs_cmd, "%s %s", tmp, MONDO_XORRISO_OPT); 505 } else if ((tmp = find_home_of_exe("genisoimage")) != NULL) { 506 mr_asprintf(isofs_cmd, "%s %s", tmp, MONDO_GENISOIMAGE_OPT); 507 } else if ((tmp = find_home_of_exe("mkisofs")) != NULL) { 508 mr_asprintf(isofs_cmd, "%s %s", tmp, MONDO_MKISOFS_OPT); 509 } else if ((tmp = find_home_of_exe("wodim")) != NULL) { 510 mr_asprintf(isofs_cmd, "%s %s", tmp, MONDO_WODIM_OPT); 502 511 } else { 503 fatal_error("Please install either cdrecord or dvdrecord."); 504 } 505 if (find_home_of_exe("xorriso")) { 506 mr_asprintf(isofs_cmd, "%s", MONDO_XORRISO_CMD); 507 } else if (find_home_of_exe("genisoimage")) { 508 mr_asprintf(isofs_cmd, "%s", MONDO_GENISOIMAGE_CMD); 509 } else { 510 mr_asprintf(isofs_cmd, "%s", MONDO_MKISOFS_CMD); 511 } 512 fatal_error("Unable to find a command to create ISO among xorriso, genisoimage, mksiofs or wodim, please install one"); 513 } 514 mr_free(tmp); 515 512 516 if (bkpinfo->nonbootable_backup) { 513 517 mr_asprintf(mondo_mkisofs_sz, "%s%s", isofs_cmd, MONDO_MKISOFS); … … 965 969 retval += whine_if_not_found("bzip2"); 966 970 retval += whine_if_not_found("gzip"); 971 retval += whine_if_not_found("cmp"); 967 972 retval += whine_if_not_found("awk"); 968 973 retval += whine_if_not_found("md5sum"); … … 981 986 } 982 987 983 if (!find_home_of_exe("cmp")) {984 whine_if_not_found("cmp");985 }986 988 run_program_and_log_output("umount `mount | grep cdr | cut -d' ' -f3 | tr '\n' ' '`", 5); 987 989 tmp = call_program_and_get_last_line_of_output("mount | grep -E 'cdr(om|w)'");
Note:
See TracChangeset
for help on using the changeset viewer.