mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-26 23:34:25 +02:00
Corrected syntax
This commit is contained in:
parent
7867759750
commit
aa91bb4c85
@ -991,7 +991,7 @@
|
|||||||
|
|
||||||
"Linux")
|
"Linux")
|
||||||
# Try fetching information from /sys in case 'ip' is not available or does not give expected results
|
# Try fetching information from /sys in case 'ip' is not available or does not give expected results
|
||||||
if IsEmpty "${FIND}" -a -d /sys/class/net ]; then
|
if IsEmpty "${FIND}" && [ -d /sys/class/net ]; then
|
||||||
NET_INTERFACES=$(${FINDBINARY} /sys/class/net ! -type d -exec realpath {} \; 2> /dev/null | sort | awk -F'/' '!/virtual/ && /devices/ {for (x=1;x<=NF;x++) if ($x~"net") print $(x+1)}')
|
NET_INTERFACES=$(${FINDBINARY} /sys/class/net ! -type d -exec realpath {} \; 2> /dev/null | sort | awk -F'/' '!/virtual/ && /devices/ {for (x=1;x<=NF;x++) if ($x~"net") print $(x+1)}')
|
||||||
for INTERFACE in ${NET_INTERFACES}; do
|
for INTERFACE in ${NET_INTERFACES}; do
|
||||||
if grep -q -s 'up' "/sys/class/net/${INTERFACE}/operstate"; then
|
if grep -q -s 'up' "/sys/class/net/${INTERFACE}/operstate"; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user