Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions')
-rw-r--r--include/functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/functions b/include/functions
index 33a4edb9..6c4d76c7 100644
--- a/include/functions
+++ b/include/functions
@@ -991,7 +991,7 @@
"Linux")
# 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)}')
for INTERFACE in ${NET_INTERFACES}; do
if grep -q -s 'up' "/sys/class/net/${INTERFACE}/operstate"; then