Changeset 1669 in MondoRescue for branches/stable/mondo
- Timestamp:
- Sep 30, 2007, 8:16:06 PM (18 years ago)
- Location:
- branches/stable/mondo
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/distributions/conf/mondo.conf.dist
r1639 r1669 91 91 #mondorescue_kernel="/boot/vmlinuz.special" 92 92 93 # DONE 93 94 # 94 95 # Additional modules to support -
branches/stable/mondo/src/common/libmondo-archive.c
r1663 r1669 474 474 copy_mondo_and_mindi_stuff_to_scratchdir(); // payload, too, if it exists 475 475 #if __FreeBSD__ == 5 476 strcpy(bkpinfo->kernel_path, "/boot/kernel/kernel");476 mr_allocstr(bkpinfo->kernel_path, "/boot/kernel/kernel"); 477 477 #elif __FreeBSD__ == 4 478 strcpy(bkpinfo->kernel_path, "/kernel");478 mr_allocstr(bkpinfo->kernel_path, "/kernel"); 479 479 #elif linux 480 480 if (figure_out_kernel_path_interactively_if_necessary … … 763 763 fd1 = mr_fopen(MONDORESTORECFG, "a"); 764 764 765 mr_fprintf(fd, "mindi_use_own_kernel=yes\n"); 766 if (strcmp(mr_conf->mondo_kernel,"FAILSAFE") == 0) { 767 } else { 768 } 765 769 mr_fprintf(fd, "mindi_kernel=%s\n", bkpinfo->kernel_path); 766 mr_fprintf(fd, "mindi_use_own_kernel=yes\n");767 770 768 771 mr_fprintf(fd1, "files-in-filelist=%ld\n", lines_in_filelist); … … 868 871 } else { 869 872 mr_fprintf(fd1, "differential=no\n"); 873 } 874 if (mr_conf->mondo_create_mindi_cd) { 875 mr_fprintf(fd1, "mindi_write_cd=yes\n"); 876 } else { 877 mr_fprintf(fd1, "mindi_write_cd=no\n"); 870 878 } 871 879 -
branches/stable/mondo/src/common/libmondo-devices.c
r1663 r1669 1988 1988 #endif 1989 1989 { 1990 strcpy(bkpinfo->kernel_path, "FAILSAFE");1990 mr_allocstr(bkpinfo->kernel_path, "FAILSAFE"); 1991 1991 } 1992 1992 -
branches/stable/mondo/src/common/libmondo-files.c
r1663 r1669 250 250 char *command = NULL; 251 251 252 malloc_string(tmp); 253 if (!kernel[0]) { 254 strcpy(kernel, 252 if (kernel == NULL) { 253 mr_allocstr(kernel, 255 254 call_program_and_get_last_line_of_output 256 255 ("mindi --findkernel 2> /dev/null")); 257 256 } 258 257 // If we didn't get anything back, check whether mindi raised a fatal error 259 if ( !kernel[0]) {258 if (kernel == NULL) { 260 259 mr_asprintf(&command, "grep 'Fatal error' /var/log/mindi.log"); 261 strcpy(tmp, call_program_and_get_last_line_of_output(command));260 mr_asprintf(&tmp, call_program_and_get_last_line_of_output(command)); 262 261 if (strlen(tmp) > 1) { 263 262 popup_and_OK(tmp); … … 265 264 } 266 265 mr_free(command); 266 mr_free(tmp); 267 267 } 268 268 log_it("Calling Mindi with kernel path of '%s'", kernel); 269 while ( !kernel[0]) {269 while (kernel == NULL) { 270 270 if (!ask_me_yes_or_no 271 271 ("Kernel not found or invalid. Choose another?")) { -
branches/stable/mondo/src/common/libmondo-tools.c
r1663 r1669 740 740 741 741 bkpinfo->media_size = mr_conf->iso_burning_speed; 742 mr_asprintf(&tmp,mr_conf->kernel); 743 bkpinfo->kernel_path = tmp; 744 742 745 bkpinfo->boot_loader = '\0'; 743 746 bkpinfo->boot_device[0] = '\0'; … … 773 776 bkpinfo->image_devs[0] = '\0'; 774 777 bkpinfo->postnuke_tarball[0] = '\0'; 775 bkpinfo->kernel_path[0] = '\0';776 778 bkpinfo->nfs_mount[0] = '\0'; 777 779 bkpinfo->nfs_remote_dir[0] = '\0'; -
branches/stable/mondo/src/common/mondostructures.h
r1639 r1669 525 525 * included with Mindi. 526 526 */ 527 char kernel_path[MAX_STR_LEN];527 char *kernel_path; 528 528 529 529 /** -
branches/stable/mondo/src/mondoarchive/mondo-cli.c
r1663 r1669 593 593 } 594 594 if (flag_set['k']) { 595 strncpy(bkpinfo->kernel_path, flag_val['k'], MAX_STR_LEN);595 mr_allocstr(bkpinfo->kernel_path, flag_val['k']); 596 596 if (!strcmp(bkpinfo->kernel_path, "failsafe")) { 597 strcpy(bkpinfo->kernel_path, "FAILSAFE");597 mr_allocstr(bkpinfo->kernel_path, "FAILSAFE"); 598 598 } 599 599 if (strcmp(bkpinfo->kernel_path, "FAILSAFE")
Note:
See TracChangeset
for help on using the changeset viewer.