aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author3PO <r2d2@freakmail.de>2017-12-31 22:50:57 +0100
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-01-05 14:56:33 -0600
commitf42ec82f21f3760b829507344ad0ae761e1d59aa (patch)
treef6ccb4ad455ff8def6cb632c74b864c83f2b21b9
parent7affff568a0aa83d732757c4699d4b94b7e3a9aa (diff)
net-online: only process symbolic links in /sys/class/net
The /sys/class/net directory contains files which are not symlinks if the system has bonded devices [1]. We should ignore these files. This fixes #196. [1] https://elkano.org/blog/manage-interface-bondings-sysfs-interface/
-rw-r--r--init.d/net-online.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/init.d/net-online.in b/init.d/net-online.in
index 1175f29c..484fe87d 100644
--- a/init.d/net-online.in
+++ b/init.d/net-online.in
@@ -23,6 +23,7 @@ get_interfaces()
{
local ifname iftype
for ifname in /sys/class/net/*; do
+ [ -h "${ifname}" ] && continue
read iftype < ${ifname}/type
[ "$iftype" = "1" ] && printf "%s " ${ifname##*/}
done