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 f42ec82f21
.
This fixes #391.
This commit is contained in:
parent
5c9c2a1939
commit
bf9af1fb23
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user