From f42ec82f21f3760b829507344ad0ae761e1d59aa Mon Sep 17 00:00:00 2001 From: 3PO Date: Sun, 31 Dec 2017 22:50:57 +0100 Subject: 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/ --- init.d/net-online.in | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3