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)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.