From bf9af1fb23b57af38880d824e7bba37a648f12fb Mon Sep 17 00:00:00 2001 From: Gaƫl PORTAY Date: Sun, 13 Dec 2020 12:00:39 -0500 Subject: net-online: fix process of symlinks in sysfs The test `[ -h "${ifname}" ] && continue` skips the symlinks while it is the opposite that is the expected: ignoring files that are not symlinks. Fixes commit f42ec82f21f3760b829507344ad0ae761e1d59aa. This fixes #391. --- init.d/net-online.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.d/net-online.in b/init.d/net-online.in index b496e258..4f59cc14 100644 --- a/init.d/net-online.in +++ b/init.d/net-online.in @@ -23,7 +23,7 @@ get_interfaces() { local ifname iftype for ifname in /sys/class/net/*; do - [ -h "${ifname}" ] && continue + [ -h "${ifname}" ] || continue read iftype < ${ifname}/type [ "$iftype" = "1" ] && printf "%s " ${ifname##*/} done -- cgit v1.2.3