diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh index 2b9df02005..d27bd8cd5f 100755 --- a/modules.d/35network-manager/nm-config.sh +++ b/modules.d/35network-manager/nm-config.sh @@ -6,4 +6,12 @@ if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then echo rd.neednet >> /etc/cmdline.d/35-neednet.conf fi +if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then + mkdir -m 0755 -p /run/NetworkManager/conf.d + ( + echo '[logging]' + echo 'level=TRACE' + ) > /run/NetworkManager/conf.d/initrd-logging.conf +fi + nm_generate_connections diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh index 889dc64d79..8b3a06365e 100755 --- a/modules.d/35network-manager/nm-run.sh +++ b/modules.d/35network-manager/nm-run.sh @@ -9,11 +9,7 @@ for i in /usr/lib/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 + /usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon if [ -s /run/NetworkManager/initrd/hostname ]; then cat /run/NetworkManager/initrd/hostname > /proc/sys/kernel/hostname