Changeset 3271 in MondoRescue for branches/3.2/mindi/rootfs


Ignore:
Timestamp:
Apr 29, 2014, 9:23:09 PM (10 years ago)
Author:
Bruno Cornec
Message:
  • Rename the conf file mondo-restore.cfg into mondorestore.cfg for homogeneity (continued)
Location:
branches/3.2/mindi/rootfs/usr/sbin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/rootfs/usr/sbin/find-and-mount-cdrom

    r3216 r3271  
    77    for device in /dev/hd? /dev/scd? /dev/rcd? /dev/sr? /dev/cd? /dev/ide/*/*/*/*/cd /dev/scsi/*/*/*/*/cd; do
    88        [ ! "$SECOND_TRY" ] && LogIt "Trying $device"
    9         if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg 2> /dev/null`" ]; then
     9        if [ "`grep "using-cdstream yes" /tmp/mondorestore.cfg 2> /dev/null`" ]; then
    1010            pwd=`pwd`
    1111            cd $GROOVY
     
    7676fi
    7777[ "$1" = "--second-try" ] && exit 1;
    78 if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then
     78if [ "`grep "using-cdstream yes" /tmp/mondorestore.cfg 2> /dev/null`" ] ; then
    7979    LogIt "Because you are using cdstream, I won't try to mount CD."
    8080    exit 0
  • branches/3.2/mindi/rootfs/usr/sbin/hack-cfg-if-necessary

    r3216 r3271  
    1616LogIt "OK, we've found /mnt/cdrom/archives/*; great."
    1717
    18 if ! grep "backup-media-type iso" /tmp/mondo-restore.cfg 2> /dev/null ; then
     18if ! grep "backup-media-type iso" /tmp/mondorestore.cfg 2> /dev/null ; then
    1919    LogIt "Config file is fine, BTW."
    2020    exit 0
    2121fi
    2222
    23 LogIt "Re-jigging mondo-restore.cfg because you backed up to ISOs and then burned them to CDs" 1
    24 sed -i 's/backup-media-type iso/backup-media-type cdr/' /tmp/mondo-restore.cfg
     23LogIt "Re-jigging mondorestore.cfg because you backed up to ISOs and then burned them to CDs" 1
     24sed -i 's/backup-media-type iso/backup-media-type cdr/' /tmp/mondorestore.cfg
    2525LogIt "Done re-jigging. Yay."
    2626exit 0
  • branches/3.2/mindi/rootfs/usr/sbin/post-init

    r3216 r3271  
    6262
    6363mondoopt=""
    64 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2> /dev/null`" ]; then
     64if [ "`grep -i 'obdr ' /tmp/mondorestore.cfg 2> /dev/null`" ]; then
    6565    mondoopt="$mondoopt -o -d $TAPEDEV"
    6666fi
     
    7777    mondorestore $mondoopt -Z nuke
    7878elif [ "$expert" ] ; then
    79     if [ "`grep tapedev /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then
     79    if [ "`grep tapedev /tmp/mondorestore.cfg 2> /dev/null`" ] ; then
    8080    LogIt "-------------------TAPE MODE-------------------" 1
    8181    loc=`which mondorestore 2> /dev/null`
     
    9090            fi
    9191    fi
    92     elif [ "`grep using-cdstream /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then
     92    elif [ "`grep using-cdstream /tmp/mondorestore.cfg 2> /dev/null`" ] ; then
    9393        LogIt "------------------CDSTREAM MODE------------------" 1
    9494        loc=`which mondorestore 2> /dev/null`
  • branches/3.2/mindi/rootfs/usr/sbin/start-netfs

    r3261 r3271  
    1111
    1212# Get info from config file
    13 ipdev=`grep netfs-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    14 hwaddr=`grep netfs-client-hwaddr /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    15 ipaddress=`grep netfs-client-ipaddr /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    16 ipnetmask=`grep netfs-client-netmask /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    17 ipbroadcast=`grep netfs-client-broadcast /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    18 ipgateway=`grep netfs-client-defgw /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    19 proto=`grep netfs-proto /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    20 iproute=`grep netfs-route /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     13ipdev=`grep netfs-dev /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     14hwaddr=`grep netfs-client-hwaddr /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     15ipaddress=`grep netfs-client-ipaddr /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     16ipnetmask=`grep netfs-client-netmask /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     17ipbroadcast=`grep netfs-client-broadcast /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     18ipgateway=`grep netfs-client-defgw /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     19proto=`grep netfs-proto /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     20iproute=`grep netfs-route /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    2121ipconf=""
    2222pre=""
    2323post=""
    24 export netfsmount=`grep netfs-server-mount /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    25 export imgname=`grep iso-prefix /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     24export netfsmount=`grep netfs-server-mount /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     25export imgname=`grep iso-prefix /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    2626if [ "$imgname" = "" ]; then
    2727    export imgname="mondorescue"
    2828fi
    29 export dirimg=`grep netfs-server-path /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     29export dirimg=`grep netfs-server-path /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    3030if [ "$dirimg" = "" ]; then
    3131    export dirimg="/"
     
    7070
    7171        # If same system, map to the right MAC address
    72         hwaddr_found=`ifconfig $ipdev | /bin/grep HWaddr | awk '{print $NF}'`
    73         if [ "$hwaddr" != "$hwaddr_found" ]; then
    74             ipdev_new=`ifconfig -a | /bin/grep $hwaddr | awk '{print $1}'`
    75             if [ "$ipdev_new" != "" ]; then
    76                 LogIt "Interface $ipdev changed to $ipdev_new (MAC: $hwaddr)"
    77                 ipdev=$ipdev_new
    78             else
    79                 LogIt "NOTE: Interface $ipdev kept despite it doesn't match the $hwaddr MAC address"
     72        if [ "$hwaddr" != "" ]; then
     73            hwaddr_found=`ifconfig $ipdev | grep HWaddr | awk '{print $NF}'`
     74            if [ "$hwaddr" != "$hwaddr_found" ]; then
     75                ipdev_new=`ifconfig -a | grep $hwaddr | awk '{print $1}'`
     76                if [ "$ipdev_new" != "" ]; then
     77                    LogIt "Interface $ipdev changed to $ipdev_new (MAC: $hwaddr)"
     78                    ipdev=$ipdev_new
     79                else
     80                    LogIt "NOTE: Interface $ipdev kept despite it doesn't match the $hwaddr MAC address"
     81                fi
    8082            fi
    8183        fi
     
    118120    elif [ "$proto" != "" ]; then
    119121        if [ -x /sbin/rpcbind ]; then
    120             "Starting rpcbind daemon..."
     122            echo "Starting rpcbind daemon..."
    121123            /sbin/rpcbind -w &
    122124        fi
  • branches/3.2/mindi/rootfs/usr/sbin/start-usb

    r3216 r3271  
    77
    88# Get info from config file
    9 MRUSBDEV=`grep usb-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     9MRUSBDEV=`grep usb-dev /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    1010
    1111# info from cmdline are predominent
Note: See TracChangeset for help on using the changeset viewer.