aboutsummaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
authorGaƫl PORTAY <gael.portay@gmail.com>2020-12-13 12:00:39 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2020-12-22 12:49:48 -0600
commitbf9af1fb23b57af38880d824e7bba37a648f12fb (patch)
tree37aa66c7451152e804cdde1a06b2a2bdcc09d367 /init.d
parent5c9c2a19397eb7bcc0bd1c7091229bbf9ef883b5 (diff)
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.
Diffstat (limited to 'init.d')
-rw-r--r--init.d/net-online.in2
1 files changed, 1 insertions, 1 deletions
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