Changeset 3397


Ignore:
Timestamp:
Aug 4, 2015, 8:57:22 AM (3 years ago)
Author:
bruno
Message:

Adds a boot-type config option

It's filled by mondoarchive, passed to mindi as new 23rd param and
stored in the config file. It's also now read at restore time. No
exploitation of this parameter is done yet.
Remains also to prepare a correct bootable device for restoration
(currently ia64 == EFI we should manage the boot loader separately from
the boot type and from the boot env of the DR media)

Location:
branches/3.2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3396 r3397  
    959959    echo "use-lzma $use_lzma" >> $outfile
    960960    echo "use-comp $use_comp" >> $outfile
     961    echo "boot-type $BOOT_TYPE" >> $outfile
    961962    echo "datestamp `date`" >> $outfile
    962963    [ "$ESTIMATED_TOTAL_NOOF_SLICES" ] && echo "total-slices $ESTIMATED_TOTAL_NOOF_SLICES" >> $outfile
     
    32313232        USE_LZMA="${21}"
    32323233        NOT_BOOT="${22}"
     3234        BOOT_TYPE="${23}"
    32333235        [ "$USE_COMP" = "" ] && USE_COMP=yes
    32343236        [ "$USE_GZIP" = "" ] && USE_GZIP=no
  • branches/3.2/mondo/src/common/libmondo-archive.c

    r3380 r3397  
    496496    char *bootldr_str = NULL;
    497497    char *bootldr_ver = NULL;
     498    char *boot_type = NULL;
    498499    char *tape_device = NULL;
    499500    char *last_filelist_number = NULL;
     
    591592    } else {
    592593        mr_asprintf(use_lilo_sz, "no");
     594    }
     595    if (bkpinfo->boot_type == UEFI) {
     596        mr_asprintf(boot_type, "UEFI");
     597    } else if (bkpinfo->boot_type == EFI) {
     598        mr_asprintf(boot_type, "EFI");
     599    } else if (bkpinfo->boot_type == BIOS) {
     600        mr_asprintf(boot_type, "BIOS");
     601    } else {
     602        mr_asprintf(boot_type, "UNKNOWN");
    593603    }
    594604
     
    856866            use_lzma_sz,        // parameter #21 (STRING)
    857867            value,          // parameter #22 (STRING)
     868            boot_type,      // parameter #23 (STRING)
    858869            MONDO_LOGFILE       // redirect to log file
    859870            );
     
    863874    mr_free(tape_size_sz);
    864875    mr_free(use_lzo_sz);
     876    mr_free(boot_type);
    865877    mr_free(cd_recovery_sz);
    866878    mr_free(broken_bios_sz);
  • branches/3.2/mondo/src/mondorestore/mondo-rstr-tools.c

    r3383 r3397  
    834834}
    835835
     836/* BCO: Read here the boot_* variables */
     837read_cfg_var(cfg_file, "boot-type", value);
     838if (!strcmp(value, "BIOS")) {
     839    bkpinfo->boot_type = BIOS;
     840} else if (!strcmp(value, "EFI")) {
     841    bkpinfo->boot_type = EFI;
     842} else if (!strcmp(value, "UEFI")) {
     843    bkpinfo->boot_type = UEFI;
     844} else {
     845    log_msg(1, "No known boot type found");
     846}
     847log_msg(1, "Found %s boot type",value);
     848
    836849if (bkpinfo->backup_media_type == netfs) {
    837850    if (!cfgf) {
Note: See TracChangeset for help on using the changeset viewer.