Changeset 1671


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

handle 2 new conf file parameters

Location:
branches/stable
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/mindi

    r1663 r1671  
    100100CDROM_MODS="$TAPE_MODS $IDE_MODS $mindi_cdrom_mods $USB_MODS $PCMCIA_MODS"
    101101NET_MODS="$mindi_net_mods"
     102# BERLIOS: Handle the case where all is passed (cloning mode)
    102103EXTRA_MODS="$CDROM_MODS $mindi_extra_mods $mindi_additional_mods"
    103104DENY_MODS="$mindi_deny_mods"
  • branches/stable/mondo-web/mondo-web.pl

    r1581 r1671  
    9797        'ELILO' => "ELILO (ia64)",
    9898        'RAW' => "RAW",
     99        'BOOT0' => "BOOT0 (FreeBSD)",
     100        'DD' => "DD (FreeBSD)",
    99101        'NATIVE' => "Autodetected",
    100102);
  • branches/stable/mondo/distributions/conf/mondo.conf.dist

    r1669 r1671  
    9191#mondorescue_kernel="/boot/vmlinuz.special"
    9292
    93 # DONE
    9493#
    9594# Additional modules to support
     
    10099#
    101100# Boot loader to use
    102 # (GRUB|ELILO|LILO|RAW|NATIVE)
     101# (GRUB|ELILO|LILO|RAW|BOOT0|DD|NATIVE)
    103102#
    104103mondo_boot_loader="NATIVE"
    105104
     105# DONE
    106106#
    107107# Differential backup or full (yes|no)
  • 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);
  • branches/stable/mondo/src/common/libmondo-tools.c

    r1670 r1671  
    743743    bkpinfo->kernel_path = tmp;
    744744
    745     bkpinfo->boot_loader = '\0';
     745    if (strcmp(mr_conf->boot_loader,"LILO") == 0) {
     746        bkpinfo->boot_loader = 'L';
     747    } else if (strcmp(mr_conf->boot_loader,"GRUB") == 0) {
     748        bkpinfo->boot_loader = 'G';
     749    } else if (strcmp(mr_conf->boot_loader,"ELILO") == 0) {
     750        bkpinfo->boot_loader = 'E';
     751    } else if (strcmp(mr_conf->boot_loader,"RAW") == 0) {
     752        bkpinfo->boot_loader = 'R';
     753    } else if (strcmp(mr_conf->boot_loader,"DD") == 0) {
     754        bkpinfo->boot_loader = 'D';
     755    } else if (strcmp(mr_conf->boot_loader,"BOOT0") == 0) {
     756        bkpinfo->boot_loader = 'B';
     757    } else if (strcmp(mr_conf->boot_loader,"NATIVE") == 0) {
     758        bkpinfo->boot_loader = '\0';
     759    } else{
     760        mr_msg("Boot Loader %s unknown\n",mr_conf->boot_loader);
     761        fatal_error("Unknown Boot Loader in conf file");
     762    }
    746763    bkpinfo->boot_device[0] = '\0';
    747764    bkpinfo->zip_exe[0] = '\0';
Note: See TracChangeset for help on using the changeset viewer.