Changeset 3270 in MondoRescue for branches/3.2/mindi/mindi


Ignore:
Timestamp:
Apr 29, 2014, 9:17:02 PM (10 years ago)
Author:
Bruno Cornec
Message:
  • Remove now useless mr-net-find
  • Rename in mindi the conf file mondo-restore.cfg into mondorestore.cfg for homogeneity
  • NETFS-SERVER-MOUNT remains the only built file by mondo for net configuration and mindi now uses mr-net-get-config to build the network conf
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3261 r3270  
    650650        fi
    651651        cp -f $MINDI_TMP/BOOTLOADER.* $bigdir 2>> $LOGFILE || LogIt "\nINFO: Mondo v1.2x defaults to LILO as the bootloader, BTW."
    652         if [ -e "$MINDI_TMP/NETFS-DEV" ] ; then
     652        if [ -e "$MINDI_TMP/NETFS-SERVER-MOUNT" ] ; then
    653653            LogAll "\nINFO: Incorporating Network-related settings"
    654654            for r in NETFS-* ISO-PREFIX ; do
     
    974974}
    975975
    976 # Called by TurnTgzIntoRdz, to make /tmp/mondo-restore.cfg
     976# Called by TurnTgzIntoRdz, to make /tmp/mondorestore.cfg
    977977MakeMondoConfigFile() {
    978978    local outfile use_lzo use_comp use_star
     
    997997    echo "datestamp `date`" >> $outfile
    998998    [ "$ESTIMATED_TOTAL_NOOF_SLICES" ] && echo "total-slices $ESTIMATED_TOTAL_NOOF_SLICES" >> $outfile
    999     AddFileToCfgIfExists $MINDI_TMP/NETFS-DEV           netfs-dev           $outfile
    1000     AddFileToCfgIfExists $MINDI_TMP/NETFS-PROTO         netfs-proto           $outfile
    1001     AddFileToCfgIfExists $MINDI_TMP/NETFS-CLIENT-IPADDR netfs-client-ipaddr $outfile
    1002     AddFileToCfgIfExists $MINDI_TMP/NETFS-CLIENT-NETMASK netfs-client-netmask $outfile
    1003     AddFileToCfgIfExists $MINDI_TMP/NETFS-CLIENT-BROADCAST netfs-client-broadcast $outfile
    1004     AddFileToCfgIfExists $MINDI_TMP/NETFS-CLIENT-HWADDR netfs-client-hwaddr $outfile
    1005     AddFileToCfgIfExists $MINDI_TMP/NETFS-CLIENT-DEFGW  netfs-client-defgw  $outfile
    1006     AddFileToCfgIfExists $MINDI_TMP/NETFS-SERVER-MOUNT  netfs-server-mount  $outfile
    1007     AddFileToCfgIfExists $MINDI_TMP/NETFS-SERVER-USER  netfs-server-user  $outfile
    1008     AddFileToCfgIfExists $MINDI_TMP/NETFS-SERVER-PATH   netfs-server-path   $outfile
    1009     AddFileToCfgIfExists $MINDI_TMP/NETFS-SERVER-IPADDR netfs-server-ipaddr $outfile
    1010999    AddFileToCfgIfExists $MINDI_TMP/ISO-DEV           iso-dev           $outfile
    10111000    AddFileToCfgIfExists $MINDI_TMP/ISO-MNT           iso-mnt           $outfile
     
    10221011    AddFileToCfgIfExists $MINDI_TMP/XATTR      xattr      $outfile
    10231012    AddFileToCfgIfExists $MINDI_TMP/OBDR      obdr      $outfile
     1013    # Deal with network configuration in a portable way
     1014    if [ -f $MINDI_TMP/NETFS-SERVER-MOUNT ]; then
     1015        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
     1017    fi
    10241018}
    10251019
     
    17331727    if [ _"$MONDO_SHARE" != _"" ]; then
    17341728        if [ "$CDRECOVERY" != "yes" ] ; then
    1735             if [ -e "$MINDI_TMP/NETFS-DEV" ] ; then
     1729            if [ -e "$MINDI_TMP/NETFS-SERVER-MOUNT" ] ; then
    17361730                echo -en "Press <enter> to continue.\n"
    17371731            elif [ ! "$MINDI_TMP" ] ; then
     
    17801774    # In case it's mondoarchive
    17811775    elif [ _"$MONDO_SHARE" != _"" ]; then
    1782         if [ -e "$MINDI_TMP/NETFS-DEV" ] ; then
     1776        if [ -e "$MINDI_TMP/NETFS-SERVER-MOUNT" ] ; then
    17831777            echo -en "default${sep}iso\n"
    17841778        else
     
    18991893
    19001894    mkdir -p $mountpoint/tmp
    1901     if [ -f "$MINDI_TMP/mondo-restore.cfg" ]; then
    1902         cp -f $MINDI_TMP/mondo-restore.cfg $mountpoint/tmp
     1895    if [ -f "$MINDI_TMP/mondorestore.cfg" ]; then
     1896        cp -f $MINDI_TMP/mondorestore.cfg $mountpoint/tmp
    19031897    fi
    19041898
     
    19941988
    19951989    mkdir -p $mountpoint/tmp
    1996     if [ -f "$MINDI_TMP/mondo-restore.cfg" ]; then
    1997         cp -f $MINDI_TMP/mondo-restore.cfg $mountpoint/tmp
     1990    if [ -f "$MINDI_TMP/mondorestore.cfg" ]; then
     1991        cp -f $MINDI_TMP/mondorestore.cfg $mountpoint/tmp
    19981992    fi
    19991993
     
    21002094    mkdir -p $bigdir/tmp
    21012095    if [ _"$MONDO_SHARE" != _"" ]; then
    2102         MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg
    2103         cp -f $MINDI_TMP/mondo-restore.cfg $bigdir/tmp &> /dev/null
     2096        # 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
    21042099    fi
    21052100    [ -d "/mnt/.boot.d" ] && echo "GENTOO" > $bigdir/tmp/DUMBASS-GENTOO
     
    26802675    list_of_groovy_mods="$CDROM_MODS $FORCE_MODS"
    26812676
    2682     if [ -e "$MINDI_TMP/NETFS-DEV" ] ; then
     2677    if [ -e "$MINDI_TMP/NETFS-SERVER-MOUNT" ] ; then
    26832678        # For PXE boot
    26842679        list_of_groovy_mods="$list_of_groovy_mods $NET_MODS"
     
    27702765    [ "$TAPEDEV" ] && echo -en "$TAPEDEV" > $mountpoint/tmp/TAPEDEV-LIVES-HERE
    27712766    if [ _"$MONDO_SHARE" != _"" ]; then
    2772         MakeMondoConfigFile $mountpoint/tmp/mondo-restore.cfg
    2773         cp -f $mountpoint/tmp/mondo-restore.cfg $MINDI_TMP 2>> $LOGFILE || Die "Cannot copy mondo-restore.cfg to ramdisk"
     2767        MakeMondoConfigFile $mountpoint/tmp/mondorestore.cfg
     2768        cp -f $mountpoint/tmp/mondorestore.cfg $MINDI_TMP 2>> $LOGFILE || Die "Cannot copy mondorestore.cfg to ramdisk"
    27742769        cp -f $MINDI_TMP/mountlist.txt $mountpoint/tmp/ 2>> $LOGFILE || Die "Cannot copy mountlist to ramdisk"
    27752770        echo -en "$FILES_IN_FILELIST" > $mountpoint/tmp/FILES-IN-FILELIST
     
    32903285LogFile "NOT_BOOT = '$NOT_BOOT'"
    32913286if [ "$NOT_BOOT" != "" ] && [ "$NOT_BOOT" != "0" ] && [ "$NOT_BOOT" != "no" ] ; then
    3292     LogIt "INFO: Just creating mondo-restore.cfg and a small all.tar.gz for Mondo. Nothing else."
    3293     MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg
     3287    LogIt "INFO: Just creating mondorestore.cfg and a small all.tar.gz for Mondo. Nothing else."
     3288    MakeMondoConfigFile $MINDI_TMP/mondorestore.cfg
    32943289    MakeMountlist $MINDI_TMP/mountlist.txt
    32953290    CheckMountlist $MINDI_TMP/mountlist.txt
    32963291    mkdir -p $MINDI_TMP/small-all/tmp
    32973292    cd "$MINDI_TMP/small-all"
    3298     cp -f $MINDI_TMP/{mountlist.txt,mondo-restore.cfg,filelist.full.gz,biggielist.txt} tmp 2>> $LOGFILE || Die "Cannot copy small all.tar.gz"
     3293    cp -f $MINDI_TMP/{mountlist.txt,mondorestore.cfg,filelist.full.gz,biggielist.txt} tmp 2>> $LOGFILE || Die "Cannot copy small all.tar.gz"
    32993294    tar -cv ./tmp | gzip -9 > $MINDI_TMP/all.tar.gz 2>> $MINDI_TMP/$$.log || Die "Cannot make small all.tar.gz" $MINDI_TMP/$$.log
    33003295    sleep 2
Note: See TracChangeset for help on using the changeset viewer.