diff --git a/xCAT/postscripts/enablekdump b/xCAT/postscripts/enablekdump index 1c6ad2d92..f713c69cf 100755 --- a/xCAT/postscripts/enablekdump +++ b/xCAT/postscripts/enablekdump @@ -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 diff --git a/xCAT/postscripts/hardeths b/xCAT/postscripts/hardeths index f3f8b2236..3c72f3dd0 100755 --- a/xCAT/postscripts/hardeths +++ b/xCAT/postscripts/hardeths @@ -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"