diff --git a/include/tests_networking b/include/tests_networking index ddb846d2..49b5b45d 100644 --- a/include/tests_networking +++ b/include/tests_networking @@ -266,6 +266,10 @@ Linux) if [ ! -z "${IFCONFIGBINARY}" ]; then FIND=$(${IFCONFIGBINARY} -a 2> /dev/null | ${GREPBINARY} "HWaddr" | ${AWKBINARY} '{ if ($4=="HWaddr") print $5 }' | ${SORTBINARY} -u) + # CentOS 7.x and others may return nothing. Let's retry with 'ether' field. + if [ -z "${FIND}" ]; then + FIND=$(${IFCONFIGBINARY} -a 2> /dev/null | ${AWKBINARY} '{ if ($1=="ether") print $2 }' | ${SORTBINARY} -u) + fi else if [ ! -z "${IPBINARY}" ]; then LogText "Test: Using ip binary to gather hardware addresses"