diff --git a/scripts/collect/mac-address/number.string b/scripts/collect/mac-address/number.string index e804d6257ce9e39fe255d02104d7c110e94826be..52abc3e406d533e56a44f9c5c2822a6719d3c968 100755 --- a/scripts/collect/mac-address/number.string +++ b/scripts/collect/mac-address/number.string @@ -21,8 +21,13 @@ PATH=${PATH}:/sbin:/usr/sbin -INTERFACE=$(route | grep default | awk '{print $NF}') -MACADDR=$(ifconfig ${INTERFACE} | head -n1 | awk '{print $NF}' 2> /dev/null) +# Include getNetworkInterface() +source ${PREFIX}/client/common.sh + +# Obtain the network interface in use +getNetworkInterface + +MACADDR=$(ifconfig ${interface} | head -n1 | awk '{print $NF}' 2> /dev/null) MACEXPRESSION="^([a-f0-9]{2}:){5}[a-f0-9]{2}$" if test -n "$(egrep -i ${MACEXPRESSION} <<< ${MACADDR})"; then