Ignore:
Timestamp:
Apr 30, 2014, 12:30:11 PM (6 years ago)
Author:
Bruno Cornec
Message:
  • File KEYMAP-LIVES-HERE, USING-* not used anymore
  • Nomalize name usinf iso-dir and ISO-DIR where relevant
  • config entry netfs-server-path not used anymore (iso-dir instead when needed)
  • In network restore mode, also have the extended boot messages
  • Manages grub2 version string as grub 1 was
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3277 r3278  
    3535MINDI_LIB=LLL
    3636MINDI_CACHE=/var/cache/mindi
     37
     38MRCFG=mondorestore.cfg
    3739
    3840# Temporary directory for mindi
     
    400402        LogFile "INFO: Debian-style config detected."
    401403        mkdir -p $bigdir/tmp
    402         echo "/etc/console/boottime.kmap.gz" > $bigdir/tmp/KEYMAP-LIVES-HERE
     404        echo "keymap-lives-here /etc/console/boottime.kmap.gz" >> $bigdir/tmp/$MRCFG
    403405        KBDEPTH=0
    404406        mkdir -p $bigdir/etc/console
     
    415417            kbdfile="/etc/console-setup/cached.kmap.gz"
    416418        fi
    417         echo $kbdfile > $bigdir/tmp/KEYMAP-LIVES-HERE
     419        echo "keymap-lives-here $kbdfile" >> $bigdir/tmp/$MRCFG
    418420        KBDEPTH=0
    419421        mkdir -p $bigdir/etc/console-setup
     
    479481    LogAll "INFO: Adding the following keyboard mapping tables: "
    480482    mkdir -p $bigdir/tmp
    481     echo "$mappath" > $bigdir/tmp/KEYMAP-LIVES-HERE
     483    echo "keymap-lives-here $mappath" >> $bigdir/tmp/$MRCFG
    482484    KBDEPTH=0
    483485    AddKeyboardMappingFile $mappath
     
    652654        if [ -e "$MINDI_TMP/NETFS-SERVER-MOUNT" ] ; then
    653655            LogAll "\nINFO: Incorporating Network-related settings"
    654             for r in NETFS-* ISO-PREFIX ; do
     656            for r in NETFS-* ; do
    655657                cp -f $MINDI_TMP/$r $bigdir/tmp 2>> $LOGFILE || Die "Cannot copy $r - did you run out of disk space?"
    656658                LogFile "INFO: Copying $r to ramdisk"
     
    974976}
    975977
    976 # Called by TurnTgzIntoRdz, to make /tmp/mondorestore.cfg
     978# Called by TurnTgzIntoRdz, to make /tmp/$MRCFG
    977979MakeMondoConfigFile() {
    978980    local outfile use_lzo use_comp use_star
     
    10001002    AddFileToCfgIfExists $MINDI_TMP/ISO-MNT           iso-mnt           $outfile
    10011003    AddFileToCfgIfExists $MINDI_TMP/ISO-PREFIX        iso-prefix        $outfile
    1002     AddFileToCfgIfExists $MINDI_TMP/ISODIR            isodir            $outfile
     1004    AddFileToCfgIfExists $MINDI_TMP/ISO-DIR           iso-dir           $outfile
    10031005    AddFileToCfgIfExists $MINDI_TMP/BOOTLOADER.DEVICE bootloader.device $outfile
    10041006    AddFileToCfgIfExists $MINDI_TMP/BOOTLOADER.NAME   bootloader.name   $outfile
    1005     AddFileToCfgIfExists $MINDI_TMP/BOOTLOADER.VER    bootloader.ver   $outfile
    1006     AddFileToCfgIfExists $MINDI_TMP/KEYMAP-LIVES-HERE keymap-lives-here $outfile
     1007    AddFileToCfgIfExists $MINDI_TMP/BOOTLOADER.VER    bootloader.ver    $outfile
    10071008    AddFileToCfgIfExists $MINDI_TMP/TAPEDEV-HAS-DATA-DISKS tapedev-has-data-disks $outfile
    10081009    AddFileToCfgIfExists $MINDI_TMP/BACKUP-MEDIA-TYPE backup-media-type $outfile
    10091010    AddFileToCfgIfExists $MINDI_TMP/DIFFERENTIAL      differential      $outfile
    1010     AddFileToCfgIfExists $MINDI_TMP/ACL      acl      $outfile
    1011     AddFileToCfgIfExists $MINDI_TMP/XATTR      xattr      $outfile
    1012     AddFileToCfgIfExists $MINDI_TMP/OBDR      obdr      $outfile
     1011    AddFileToCfgIfExists $MINDI_TMP/ACL               acl               $outfile
     1012    AddFileToCfgIfExists $MINDI_TMP/XATTR             xattr             $outfile
     1013    AddFileToCfgIfExists $MINDI_TMP/OBDR              obdr              $outfile
     1014
    10131015    # Deal with network configuration in a portable way
    10141016    if [ -f $MINDI_TMP/NETFS-SERVER-MOUNT ]; then
    10151017        mr-net-get-config `cat $MINDI_TMP/NETFS-SERVER-MOUNT` >> $outfile
    1016         grep netfs-server-path $outfile | awk '{print $2}' > $MINDI_TMP/NETFS-SERVER-PATH
    10171018    fi
    10181019}
     
    17281729        if [ "$CDRECOVERY" != "yes" ] ; then
    17291730            if [ -e "$MINDI_TMP/NETFS-SERVER-MOUNT" ] ; then
    1730                 echo -en "Press <enter> to continue.\n"
     1731                echo -en "Press <enter> for network restore\n"
     1732                echo -en "$BOOT_MEDIA_MESSAGE"
    17311733            elif [ ! "$MINDI_TMP" ] ; then
    17321734                echo -en "FYI, this is _not_ a Mondo Rescue CD.\n"
     
    18931895
    18941896    mkdir -p $mountpoint/tmp
    1895     if [ -f "$MINDI_TMP/mondorestore.cfg" ]; then
    1896         cp -f $MINDI_TMP/mondorestore.cfg $mountpoint/tmp
     1897    if [ -f "$MINDI_TMP/$MRCFG" ]; then
     1898        cp -f $MINDI_TMP/$MRCFG $mountpoint/tmp
    18971899    fi
    18981900
     
    19881990
    19891991    mkdir -p $mountpoint/tmp
    1990     if [ -f "$MINDI_TMP/mondorestore.cfg" ]; then
    1991         cp -f $MINDI_TMP/mondorestore.cfg $mountpoint/tmp
     1992    if [ -f "$MINDI_TMP/$MRCFG" ]; then
     1993        cp -f $MINDI_TMP/$MRCFG $mountpoint/tmp
    19921994    fi
    19931995
     
    20952097    if [ _"$MONDO_SHARE" != _"" ]; then
    20962098        # BCO: no reason to have the cfg file stored twice
    2097         MakeMondoConfigFile $MINDI_TMP/mondorestore.cfg
    2098         cp -f $MINDI_TMP/mondorestore.cfg $bigdir/tmp &> /dev/null
     2099        MakeMondoConfigFile $MINDI_TMP/$MRCFG
     2100        cp -f $MINDI_TMP/$MRCFG $bigdir/tmp &> /dev/null
    20992101    fi
    21002102    [ -d "/mnt/.boot.d" ] && echo "GENTOO" > $bigdir/tmp/DUMBASS-GENTOO
     
    27722774    [ "$TAPEDEV" ] && echo -en "$TAPEDEV" > $mountpoint/tmp/TAPEDEV-LIVES-HERE
    27732775    if [ _"$MONDO_SHARE" != _"" ]; then
    2774         MakeMondoConfigFile $mountpoint/tmp/mondorestore.cfg
    2775         cp -f $mountpoint/tmp/mondorestore.cfg $MINDI_TMP 2>> $LOGFILE || Die "Cannot copy mondorestore.cfg to ramdisk"
     2776        MakeMondoConfigFile $mountpoint/tmp/$MRCFG
     2777        cp -f $mountpoint/tmp/$MRCFG $MINDI_TMP 2>> $LOGFILE || Die "Cannot copy $MRCFG to ramdisk"
    27762778        cp -f $MINDI_TMP/mountlist.txt $mountpoint/tmp/ 2>> $LOGFILE || Die "Cannot copy mountlist to ramdisk"
    27772779        echo -en "$FILES_IN_FILELIST" > $mountpoint/tmp/FILES-IN-FILELIST
    27782780        echo -en "$LAST_FILELIST_NUMBER" > $mountpoint/tmp/LAST-FILELIST-NUMBER
    2779         [ "$USE_LZO" = "yes" ] && echo -en "Pras 4 Pres 2004" >> $mountpoint/tmp/USING-LZO
    2780         [ "$USE_GZIP" = "yes" ] && echo -en "YES" >> $mountpoint/tmp/USING-GZIP
    2781         [ "$USE_COMP" = "yes" ] && echo -en "Compression, yep" >> $mountpoint/tmp/USING-COMP
    2782         [ "$USE_STAR" = "yes" ] && echo -en "Using star. Hooray." >> $mountpoint/tmp/USING-STAR
    27832781    fi
    27842782    mkdir -p $mountpoint/proc
     
    32923290LogFile "NOT_BOOT = '$NOT_BOOT'"
    32933291if [ "$NOT_BOOT" != "" ] && [ "$NOT_BOOT" != "0" ] && [ "$NOT_BOOT" != "no" ] ; then
    3294     LogIt "INFO: Just creating mondorestore.cfg and a small all.tar.gz for Mondo. Nothing else."
    3295     MakeMondoConfigFile $MINDI_TMP/mondorestore.cfg
     3292    LogIt "INFO: Just creating $MRCFG and a small all.tar.gz for Mondo. Nothing else."
     3293    MakeMondoConfigFile $MINDI_TMP/$MRCFG
    32963294    MakeMountlist $MINDI_TMP/mountlist.txt
    32973295    CheckMountlist $MINDI_TMP/mountlist.txt
    32983296    mkdir -p $MINDI_TMP/small-all/tmp
    32993297    cd "$MINDI_TMP/small-all"
    3300     cp -f $MINDI_TMP/{mountlist.txt,mondorestore.cfg,filelist.full.gz,biggielist.txt} tmp 2>> $LOGFILE || Die "Cannot copy small all.tar.gz"
     3298    cp -f $MINDI_TMP/{mountlist.txt,$MRCFG,filelist.full.gz,biggielist.txt} tmp 2>> $LOGFILE || Die "Cannot copy small all.tar.gz"
    33013299    tar -cv ./tmp | gzip -9 > $MINDI_TMP/all.tar.gz 2>> $MINDI_TMP/$$.log || Die "Cannot make small all.tar.gz" $MINDI_TMP/$$.log
    33023300    sleep 2
Note: See TracChangeset for help on using the changeset viewer.