Changeset 3440 in MondoRescue


Ignore:
Timestamp:
Aug 28, 2015, 5:39:13 PM (9 years ago)
Author:
Bruno Cornec
Message:

replace perl usage by tr as perl is not yet available for start-netfs

File:
1 edited

Legend:

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

    r3433 r3440  
    1313ipdev=`grep netfs-dev /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    1414# MAC address in uppercases
    15 hwaddr=`grep netfs-client-hwaddr /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2- | perl -nle 'print uc;'`
     15hwaddr=`grep netfs-client-hwaddr /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2- | tr '[a-z]' '[A-Z]'`
    1616ipaddress=`grep netfs-client-ipaddr /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    1717ipnetmask=`grep netfs-client-netmask /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     
    3636for i in `cat /proc/cmdline` ; do
    3737    echo $i | grep -qi ping= && ipcount=`echo $i | cut -d= -f2`
    38     echo $i | grep -qi hwaddr= && hwaddr=`echo $i | cut -d= -f2  | perl -nle 'print uc;'`
     38    echo $i | grep -qi hwaddr= && hwaddr=`echo $i | cut -d= -f2  | tr '[a-z]' '[A-Z]'`
    3939    echo $i | grep -qi ipconf= && ipconf=`echo $i | cut -d= -f2`
    4040    echo $i | grep -qi netfsmount= && export netfsmount=`echo $i | cut -d= -f2`
     
    7272        # If same system, map to the right MAC address
    7373        if [ "$hwaddr" != "" ]; then
    74             hwaddr_found=`ifconfig $ipdev | grep HWaddr | awk '{print $NF}' | perl -nle 'print uc;'`
     74            hwaddr_found=`ifconfig $ipdev | grep HWaddr | awk '{print $NF}' | tr '[a-z]' '[A-Z]'`
    7575            if [ "$hwaddr" != "$hwaddr_found" ]; then
    7676                ipdev_new=`ifconfig -a | grep -i $hwaddr | awk '{print $1}'`
     
    9696    # Handle a potential static route
    9797    if [ _"$iproute" != _"" ]; then
    98         iproute=`echo $iproute | perl -pi -e 's|:| |g'`
     98        iproute=`echo $iproute | sed -i 's/:/ /g'`
    9999        LogIt "Adding static route with route add $iproute"
    100100        route add $iproute
Note: See TracChangeset for help on using the changeset viewer.