diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2021-07-12 16:21:35 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2021-07-12 16:21:35 +0300 |
commit | aa91bb4c85b105d4884e19b7a253024e90c92ac0 (patch) | |
tree | 1630cbd73b632f00315501f1ea5644bf68229514 /include/functions | |
parent | 78677597503279d941693b5fd2adcf9e95ae05f7 (diff) |
Corrected syntax
Diffstat (limited to 'include/functions')
-rw-r--r-- | include/functions | 2 |
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 |