Ignore:
Timestamp:
Oct 1, 2007, 2:12:54 PM (13 years ago)
Author:
Bruno Cornec
Message:

handle 2 new conf file parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/libmondo-archive.c

    r1669 r1671  
    558558
    559559    assert(bkpinfo != NULL);
    560     malloc_string(bootldr_str);
    561560    malloc_string(last_filelist_number);
    562561    malloc_string(devs_to_exclude);
     
    669668    }
    670669    if (bkpinfo->boot_loader == 'L') {
    671         strcpy(bootldr_str, "LILO");
     670        mr_asprintf(&bootldr_str, "LILO");
    672671        if (!does_file_exist("/etc/lilo.conf")) {
    673672            fatal_error
     
    675674        }
    676675    } else if (bkpinfo->boot_loader == 'G') {
    677         strcpy(bootldr_str, "GRUB");
     676        mr_asprintf(&bootldr_str, "GRUB");
    678677        if (!does_file_exist("/etc/grub.conf")
    679678            && does_file_exist("/boot/grub/grub.conf")) {
     
    692691        }
    693692    } else if (bkpinfo->boot_loader == 'E') {
    694         strcpy(bootldr_str, "ELILO");
     693        mr_asprintf(&bootldr_str, "ELILO");
    695694        /* BERLIOS: fix it for Debian, Mandrake, ... */
    696695        if (!does_file_exist("/etc/elilo.conf")
     
    723722        }
    724723    } else if (bkpinfo->boot_loader == 'R') {
    725         strcpy(bootldr_str, "RAW");
     724        mr_asprintf(&bootldr_str, "RAW");
    726725    }
    727726#ifdef __FreeBSD__
    728727    else if (bkpinfo->boot_loader == 'D') {
    729         strcpy(bootldr_str, "DD");
     728        mr_asprintf(&bootldr_str, "DD");
    730729    }
    731730
    732731    else if (bkpinfo->boot_loader == 'B') {
    733         strcpy(bootldr_str, "BOOT0");
     732        mr_asprintf(&bootldr_str, "BOOT0");
    734733    }
    735734#endif
    736735    else {
    737         strcpy(bootldr_str, "unknown");
     736        mr_asprintf(&bootldr_str, "unknown");
    738737    }
    739738    mr_asprintf(&tmp, "Your boot loader is %s and it boots from %s",
     
    768767    }
    769768    mr_fprintf(fd, "mindi_kernel=%s\n", bkpinfo->kernel_path);
     769    mr_fprintf(fd, "mindi_additional_mods=%s\n", mr_conf->additional_modules);
    770770
    771771    mr_fprintf(fd1, "files-in-filelist=%ld\n", lines_in_filelist);
     
    777777    mr_fprintf(fd1, "bootloader.name=%s\n", bootldr_str);
    778778    mr_fprintf(fd1, "bootloader.device=%s\n", bkpinfo->boot_device);
     779
     780    mr_free(bootldr_str);
    779781
    780782    switch (bkpinfo->backup_media_type) {
     
    961963        mr_free(tmp);
    962964    }
    963     mr_free(bootldr_str);
    964965    mr_free(last_filelist_number);
    965966    mr_free(devs_to_exclude);
Note: See TracChangeset for help on using the changeset viewer.