From fb152e91317e0053f37b731d258c80db3ae95d97 Mon Sep 17 00:00:00 2001 From: immarvin Date: Fri, 13 Jun 2014 19:36:34 -0700 Subject: [PATCH] replace ifconfig with ip --- xCAT-genesis-scripts/etc/init.d/functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-genesis-scripts/etc/init.d/functions b/xCAT-genesis-scripts/etc/init.d/functions index 0744c87ed..d4e3e9624 100644 --- a/xCAT-genesis-scripts/etc/init.d/functions +++ b/xCAT-genesis-scripts/etc/init.d/functions @@ -1590,7 +1590,8 @@ send_monitor_msg() { # Get the client mac address. if [ -z "$mac" ]; then - mac=`ifconfig $DEVICE 2>/dev/null | sed -ne "s/.*HWaddr //p" | sed "s/ //g" | sed s/:/./g` + #mac=`ifconfig $DEVICE 2>/dev/null | sed -ne "s/.*HWaddr //p" | sed "s/ //g" | sed s/:/./g` + mac=`ip -4 -oneline link show $DEVICE 2>/dev/null|grep -i ether|sed -ne "s/.*ether //p"|awk -F ' ' '{print $1}'|sed s/:/./g` fi # Collect some special info only after proc file system is mounted.