Skip to content

Commit 34c73b3

Browse files
lnykrynharaldh
authored andcommitted
fix(network-manager): rework how NM is started in debug mode
Instead of running directly NM with --debug, create a drop-in in nm-config.sh. This will make sure, that we can get the debug output regardless the way how NM will be started.
1 parent 6f7823b commit 34c73b3

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

modules.d/35network-manager/nm-config.sh

+8
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,12 @@ if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then
66
echo rd.neednet >> /etc/cmdline.d/35-neednet.conf
77
fi
88

9+
if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
10+
mkdir -m 0755 -p /run/NetworkManager/conf.d
11+
(
12+
echo '[logging]'
13+
echo 'level=TRACE'
14+
) > /run/NetworkManager/conf.d/initrd-logging.conf
15+
fi
16+
917
nm_generate_connections

modules.d/35network-manager/nm-run.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ for i in /usr/lib/NetworkManager/system-connections/* \
99
/etc/NetworkManager/system-connections/* \
1010
/etc/sysconfig/network-scripts/ifcfg-*; do
1111
[ -f "$i" ] || continue
12-
if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
13-
/usr/sbin/NetworkManager --configure-and-quit=initrd --debug --log-level=trace
14-
else
15-
/usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon
16-
fi
12+
/usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon
1713

1814
if [ -s /run/NetworkManager/initrd/hostname ]; then
1915
cat /run/NetworkManager/initrd/hostname > /proc/sys/kernel/hostname

0 commit comments

Comments
 (0)