Corrected syntax

This commit is contained in:
Michael Boelen 2021-07-12 15:21:35 +02:00
parent 7867759750
commit aa91bb4c85
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04

View File

@ -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