From aa91bb4c85b105d4884e19b7a253024e90c92ac0 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Mon, 12 Jul 2021 15:21:35 +0200 Subject: Corrected syntax --- include/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/functions') 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 -- cgit v1.2.3