mirror of https://github.com/CISOfy/lynis.git
[NETW-3006] Updated detection of MAC addresses on Linux
This commit is contained in:
parent
4781b1c170
commit
49c1bf8d55
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue