Skip to content

Commit

Permalink
network-manager: don't run NetworkManager when there are no connections
Browse files Browse the repository at this point in the history
NetworkManager would unnecessarily bring up the devices, colliding with
further attempts to rename the devices.

This is arguably a NetworkManager bug and should eventually be fixed there.
Running NetworkManager without the connection is unnecessary regardless.
  • Loading branch information
lkundrak authored and haraldh committed Jan 14, 2020
1 parent 05b7570 commit 5965710
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions modules.d/35network-manager/nm-run.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
#!/bin/sh

if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
/usr/sbin/NetworkManager --configure-and-quit=initrd --debug --log-level=trace
else
/usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon
fi
for i in /usr/lib/NetworkManager/system-connections/* \
/run/NetworkManager/system-connections/* \
/etc/NetworkManager/system-connections/* \
/etc/sysconfig/network-scripts/ifcfg-*; do
[ -f "$i" ] || continue
if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
/usr/sbin/NetworkManager --configure-and-quit=initrd --debug --log-level=trace
else
/usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon
fi
break
done

for _i in /sys/class/net/*
do
Expand Down

0 comments on commit 5965710

Please sign in to comment.