Changeset 3440 in MondoRescue
- Timestamp:
- Aug 28, 2015, 5:39:13 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi/rootfs/usr/sbin/start-netfs
r3433 r3440 13 13 ipdev=`grep netfs-dev /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 14 14 # MAC address in uppercases 15 hwaddr=`grep netfs-client-hwaddr /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2- | perl -nle 'print uc;'`15 hwaddr=`grep netfs-client-hwaddr /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2- | tr '[a-z]' '[A-Z]'` 16 16 ipaddress=`grep netfs-client-ipaddr /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 17 17 ipnetmask=`grep netfs-client-netmask /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` … … 36 36 for i in `cat /proc/cmdline` ; do 37 37 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]'` 39 39 echo $i | grep -qi ipconf= && ipconf=`echo $i | cut -d= -f2` 40 40 echo $i | grep -qi netfsmount= && export netfsmount=`echo $i | cut -d= -f2` … … 72 72 # If same system, map to the right MAC address 73 73 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]'` 75 75 if [ "$hwaddr" != "$hwaddr_found" ]; then 76 76 ipdev_new=`ifconfig -a | grep -i $hwaddr | awk '{print $1}'` … … 96 96 # Handle a potential static route 97 97 if [ _"$iproute" != _"" ]; then 98 iproute=`echo $iproute | perl -pi -e 's|:| |g'`98 iproute=`echo $iproute | sed -i 's/:/ /g'` 99 99 LogIt "Adding static route with route add $iproute" 100 100 route add $iproute
Note:
See TracChangeset
for help on using the changeset viewer.