Skip to content

Commit

Permalink
fix(network-manager): skip non-directories in /sys/class/net
Browse files Browse the repository at this point in the history
There can be files in this directory, eg "bonding_masters" if a
network bond is in use.
  • Loading branch information
glennmorris authored and johannbg committed Dec 10, 2021
1 parent 14d97a6 commit d9c3c77
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules.d/35network-manager/nm-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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##*/}"
Expand Down

0 comments on commit d9c3c77

Please sign in to comment.