Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core

This commit is contained in:
immarvin 2014-06-13 09:06:39 -07:00
commit 30a9a37a19
2 changed files with 4 additions and 2 deletions

View File

@ -31,7 +31,8 @@ for i in `/bin/cat /proc/cmdline`; do
break
elif [ "$KEY" = "BOOTIF" ]; then
MACX=`/bin/echo $i | /bin/awk -F= '{print $2}'|sed -e s/^01-// -e s/-/:/g`
ETHX=`/sbin/ifconfig | /bin/grep -i $MACX | /bin/awk '{print $1}'`
#ETHX=`/sbin/ifconfig | /bin/grep -i $MACX | /bin/awk '{print $1}'`
ETHX=`/sbin/ip -oneline link show ens33|/bin/grep -i $MACX |/bin/awk -F ":" '{print $2}'|/bin/grep -o "[^ ]\+\( \+[^ ]\+\)*"`
break
fi
done

View File

@ -81,7 +81,8 @@ for nic in `ip link |grep "BROADCAST" |awk '{print $2}' | sed s/://`; do
if ( pmatch $OSVER "ubuntu*" )
then
NETWORK=`network_ipv4calc $IPADDR $NETMASK`
BROADCAST=`ifconfig $nic | grep Bcast | awk '{print $3}' | awk -F: '{print $2}'`
#BROADCAST=`ifconfig $nic | grep Bcast | awk '{print $3}' | awk -F: '{print $2}'`
BROADCAST=`ip -4 -oneline addr show $nic|grep brd| awk -F ' ' '{print $6}'`
if [ ! -z "$defgw" ]; then
gateway_line="gateway $defgw"