mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-15 19:01:44 +00:00
replace ifconfig with ip
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user