Changeset 689 in MondoRescue for trunk/mondo/mondo/common/libmondo-tools.c
- Timestamp:
- Jul 17, 2006, 7:43:58 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/libmondo-tools.c
r688 r689 348 348 char *extra_cdrom_params = NULL; 349 349 char *mondo_mkisofs_sz = NULL; 350 char *command ;351 char *hostname , *ip_address;350 char *command = NULL; 351 char *hostname = NULL, *ip_address = NULL; 352 352 int retval = 0; 353 353 long avm = 0; 354 char *colon ;355 char *cdr_exe ;356 char *tmp ;357 char *tmp1 ;354 char *colon = NULL; 355 char *cdr_exe = NULL; 356 char *tmp = NULL; 357 char *tmp1 = NULL; 358 358 char call_before_iso_user[MAX_STR_LEN] = "\0"; 359 359 int rdsiz_MB; 360 char *iso_path ;360 char *iso_path = NULL; 361 361 362 362 assert(bkpinfo != NULL); … … 439 439 440 440 if (bkpinfo->backup_media_type == dvd) { 441 if (!(find_home_of_exe("growisofs"))) { 441 tmp = find_home_of_exe("growisofs"); 442 if (!tmp) { 442 443 fatal_error("Please install growisofs."); 443 444 } 445 paranoid_free(tmp); 446 444 447 if (bkpinfo->nonbootable_backup) { 445 448 asprintf(&mondo_mkisofs_sz, MONDO_GROWISOFS_NONBOOT); … … 502 505 } 503 506 } 504 if (find_home_of_exe("cdrecord")) { 507 tmp = find_home_of_exe("cdrecord"); 508 tmp1 = find_home_of_exe("dvdrecord"); 509 if (tmp) { 505 510 asprintf(&cdr_exe, "cdrecord"); 506 } else if ( find_home_of_exe("dvdrecord")) {511 } else if (tmp1) { 507 512 asprintf(&cdr_exe, "dvdrecord"); 508 513 } else { 509 514 fatal_error("Please install either cdrecord or dvdrecord."); 510 515 } 516 paranoid_free(tmp); 517 paranoid_free(tmp1); 518 511 519 if (bkpinfo->nonbootable_backup) { 512 520 asprintf(&mondo_mkisofs_sz, "%s -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL_Version -V _CD#_", mrconf->mondo_iso_creation_cmd); … … 829 837 830 838 /*@ buffers ************ */ 831 char *tmp ;839 char *tmp = NULL; 832 840 833 841 /*@ int's *************** */ … … 913 921 /* IA64 always has one vfat partition for EFI even without Windows */ 914 922 // retval += 915 if (!find_home_of_exe("ms-sys")) { 923 tmp = find_home_of_exe("ms-sys"); 924 if (!tmp) { 916 925 log_to_screen(_("Please install ms-sys just in case.")); 917 926 } 918 #endif 919 } 920 921 if (!find_home_of_exe("cmp")) { 922 if (!find_home_of_exe("true")) { 923 whine_if_not_found("cmp"); 924 } else { 925 log_to_screen 926 (_("Your system lacks the 'cmp' binary. I'll create a dummy cmp for you.")); 927 if (run_program_and_log_output 928 ("cp -f `which true` /usr/bin/cmp", 0)) { 929 fatal_error("Failed to create dummy 'cmp' file."); 930 } 931 } 932 } 927 paranoid_free(tmp); 928 #endif 929 } 930 931 tmp = find_home_of_exe("cmp"); 932 if (!tmp) { 933 whine_if_not_found("cmp"); 934 } 935 paranoid_free(tmp); 936 933 937 run_program_and_log_output 934 938 ("umount `mount | grep cdr | cut -d' ' -f3 | tr '\n' ' '`", 5);
Note:
See TracChangeset
for help on using the changeset viewer.