From d9c3c77437d91d7d66369a3ef701ffc5e501346d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Dec 2021 14:08:35 -0800 Subject: [PATCH] fix(network-manager): skip non-directories in /sys/class/net There can be files in this directory, eg "bonding_masters" if a network bond is in use. --- modules.d/35network-manager/nm-run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh index 8d6942c9a8..7d8d61fa74 100755 --- a/modules.d/35network-manager/nm-run.sh +++ b/modules.d/35network-manager/nm-run.sh @@ -60,6 +60,7 @@ dhcpopts_create() { } for _i in /sys/class/net/*; do + [ -d "$_i" ] || continue state="/run/NetworkManager/devices/$(cat "$_i"/ifindex)" grep -q '^connection-uuid=' "$state" 2> /dev/null || continue ifname="${_i##*/}"