Changeset 2331 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-tools.c
- Timestamp:
- Aug 18, 2009, 3:25:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-tools.c
r2329 r2331 418 418 char *tmp = NULL; 419 419 char *p = NULL; 420 char call_before_iso_user = NULL;420 char *call_before_iso_user = NULL; 421 421 char *iso_dev = NULL; 422 422 char *iso_mnt = NULL; … … 494 494 495 495 if (bkpinfo->backup_media_type == dvd) { 496 if (find_home_of_exe("growisofs")) { 496 tmp = find_home_of_exe("growisofs"); 497 if (tmp) { 497 498 strcpy(cdr_exe, "growisofs"); 498 499 } // unlikely to be used 499 500 else { 501 mr_free(tmp); 500 502 fatal_error("Please install growisofs."); 501 503 } 504 mr_free(tmp); 505 502 506 if (bkpinfo->nonbootable_backup) { 503 507 mr_asprintf(mondo_mkisofs_sz, MONDO_GROWISOFS_NONBOOT); … … 554 558 mr_asprintf(extra_cdrom_params, "blank=fast "); 555 559 } 556 if (find_home_of_exe("cdrecord")) { 560 tmp = find_home_of_exe("cdrecord"); 561 if (tmp) { 557 562 strcpy(cdr_exe, "cdrecord"); 558 } else if (find_home_of_exe("dvdrecord")) {559 strcpy(cdr_exe, "dvdrecord");560 563 } else { 561 fatal_error("Please install either cdrecord or dvdrecord."); 562 } 564 mr_free(tmp); 565 tmp = find_home_of_exe("dvdrecord"); 566 if (tmp) { 567 strcpy(cdr_exe, "dvdrecord"); 568 } else { 569 mr_free(tmp); 570 fatal_error("Please install either cdrecord or dvdrecord."); 571 } 572 } 573 mr_free(tmp); 574 563 575 if (bkpinfo->nonbootable_backup) { 564 576 mr_asprintf(mondo_mkisofs_sz, MONDO_MKISOFS_NONBOOT); … … 1000 1012 } 1001 1013 1002 if (!find_home_of_exe("cmp")) { 1003 if (!find_home_of_exe("true")) { 1004 whine_if_not_found("cmp"); 1014 tmp = find_home_of_exe("cmp"); 1015 if (!tmp) { 1016 mr_free(tmp); 1017 tmp = find_home_of_exe("true"); 1018 if (!tmp) { 1019 retval += whine_if_not_found("cmp"); 1005 1020 } else { 1006 log_to_screen 1007 ("Your system lacks the 'cmp' binary. I'll create a dummy cmp for you."); 1008 if (run_program_and_log_output 1009 ("cp -f `which true` /usr/bin/cmp", 0)) { 1021 log_to_screen("Your system lacks the 'cmp' binary. I'll create a dummy cmp for you."); 1022 if (run_program_and_log_output("cp -f `which true` /usr/bin/cmp", 0)) { 1023 mr_free(tmp); 1010 1024 fatal_error("Failed to create dummy 'cmp' file."); 1011 1025 } 1012 1026 } 1013 1027 } 1014 run_program_and_log_output 1015 ("umount `mount | grep cdr | cut -d' ' -f3 | tr '\n' ' '`", 5); 1028 mr_free(tmp); 1029 1030 run_program_and_log_output("umount `mount | grep cdr | cut -d' ' -f3 | tr '\n' ' '`", 5); 1016 1031 mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output("mount | grep -E \"cdr(om|w)\"")); 1017 1032 if (strcmp("", tmp)) {
Note:
See TracChangeset
for help on using the changeset viewer.