Changeset 3444 in MondoRescue


Ignore:
Timestamp:
Aug 29, 2015, 2:32:48 AM (4 years ago)
Author:
Bruno Cornec
Message:
  • Fix a missing instruction and homogeneize logs with prefixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/rootfs/usr/sbin/start-netfs

    r3443 r3444  
    5353    # Network configuration stored during archive
    5454    # or on cmdline so network wanted => starting it
    55     LogIt "Starting Network..."
     55    LogIt "INFO: Starting Network..."
    5656
    5757    # Activate loobback
     
    8282            if [ "$hwaddr" = "$hwaddr_found" ]; then
    8383                # No renaming took place use it
     84                LogIt "INFO: Using device $ipdev (Mac Addr: $hwaddr_found)"
    8485            fi
    8586        else
     
    9394                if [ "$hwaddr" = "$mac" ]; then
    9495                    # This is the new device for the MAC address of our card at backup time
    95                     LogIt "Interface with MAC address $hwaddr changed from $ipdev to $hwdev"
    96                     LogIt "Using $hwdev for network configuration from now on"
     96                    LogIt "INFO: Interface with MAC address $hwaddr changed from $ipdev to $hwdev"
     97                    LogIt "INFO: Using $hwdev for network configuration from now on"
    9798                    ipdev=$hwdev
    9899                    break
     
    102103            if [ "$oldipdev" = "$ipdev" ]; then
    103104                # We didn't find a new device for this MAC
    104                 LogIt "NOTE: Interface $ipdev kept despite it doesn't match the $hwaddr MAC address"
     105                LogIt "WARN: Interface $ipdev kept despite it doesn't match the $hwaddr MAC address"
    105106                ipdev=$oldipdev
    106107            fi
     
    116117
    117118    if [ "$ipmode" = "DHCP" ]; then
    118         LogIt "Making DHCP request on $ipdev"
     119        LogIt "INFO: Making DHCP request on $ipdev"
    119120        udhcpc -i $ipdev
    120121    else
    121         LogIt "Configuring $ipdev statically ($ipaddress/$ipnetmask/$ipgateway)"
     122        LogIt "INFO: Configuring $ipdev statically ($ipaddress/$ipnetmask/$ipgateway)"
    122123        ifconfig $ipdev $ipaddress netmask $ipnetmask broadcast $ipbroadcast
    123124        route add default gw $ipgateway
     
    129130    if [ _"$iproute" != _"" ]; then
    130131        iproute=`echo $iproute | sed -i 's/:/ /g'`
    131         LogIt "Adding static route with route add $iproute"
     132        LogIt "INFO: Adding static route with route add $iproute"
    132133        route add $iproute
    133134    fi
    134135
    135136    # ping server helps waking interface up
    136     LogIt "Pinging Remote server..."
     137    LogIt "INFO: Pinging Remote server..."
    137138    netfs_server_ipaddr=`echo $netfsmount | cut -d: -f1 | cut -d@ -f2`
    138139    ping -c $ipcount $netfs_server_ipaddr
     
    140141    # Which is our protocol for file sharing
    141142    if [ "$proto" = "" ]; then
    142         LogIt "No protocol specified, defaulting to NFS"
     143        LogIt "WARN: No protocol specified, defaulting to NFS"
    143144        proto="nfs"
    144145    fi
    145146
    146147    if [ "$proto" = "sshfs" ]; then
    147         LogIt "Mounting SSHFS share ($netfsmount) on /tmp/isodir..."
     148        LogIt "INFO: Mounting SSHFS share ($netfsmount) on /tmp/isodir..."
    148149        # We need a correct console for ssh
    149150        ln -sf /dev/console /dev/tty
    150151        sshfs -o ro,StrictHostKeyChecking=no $netfsopt $netfsmount /tmp/isodir
    151152    elif [ "$proto" = "smbfs" ]; then
    152         LogIt "Mounting SMBFS share ($netfsmount) on /tmp/isodir..."
     153        LogIt "INFO: Mounting SMBFS share ($netfsmount) on /tmp/isodir..."
    153154        mount -t cifs $netfsmount /tmp/isodir -o ro $netfsopt
    154155    elif [ "$proto" != "" ]; then
     
    157158            /sbin/rpcbind -w &
    158159        fi
    159         LogIt "Mounting Network share ($netfsmount) on /tmp/isodir..."
     160        LogIt "INFO: Mounting Network share ($netfsmount) on /tmp/isodir..."
    160161        touch /etc/mtab
    161162        mount -t $proto -o nolock,ro $netfsopt $netfsmount /tmp/isodir
    162163    else
    163         LogIt "Unknown protocol $proto"
     164        LogIt "ERROR: Unknown protocol $proto"
    164165    fi
    165166   
    166     LogIt "Mounting Remote image ${imgname}-1.iso in $dirimg on /mnt/cdrom in loopback"
     167    LogIt "INFO: Mounting Remote image ${imgname}-1.iso in $dirimg on /mnt/cdrom in loopback"
    167168    mount -o ro,loop -t iso9660 /tmp/isodir/$dirimg/${imgname}-1.iso /mnt/cdrom
    168169
     
    170171    if [ "`echo $pre | grep -E '^/tmp/isodir'`" ]; then
    171172        cp $pre /tmp
    172         LogIt "Copying $pre under /tmp"
     173        LogIt "INFO: Copying $pre under /tmp"
    173174    fi
    174175    if [ "`echo $post | grep -E '^/tmp/isodir'`" ]; then
    175176        cp $post /tmp
    176         LogIt "Copying $post under /tmp"
     177        LogIt "INFO: Copying $post under /tmp"
    177178    fi
    178179fi
Note: See TracChangeset for help on using the changeset viewer.