From 58baf861c68b1f233da4c89d1a8a398ac307cb6c Mon Sep 17 00:00:00 2001 From: Andrew Gunnerson Date: Sun, 6 Jul 2025 00:21:53 -0400 Subject: [PATCH] fix(network-manager): depend on dbus only when using systemd network-manager does not require dbus to function when using the --configure-and-quit=initrd option. This should be guaranteed as it is documented behavior in the NetworkManager.conf(5) manpage and specifically mentions dracut's use case. With this change, initramfs images that don't or can't use systemd can use network-manager instead of the old network-legacy module. Fixes: #1422 Signed-off-by: Andrew Gunnerson --- modules.d/35network-manager/module-setup.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh index 09107708c..03a805750 100755 --- a/modules.d/35network-manager/module-setup.sh +++ b/modules.d/35network-manager/module-setup.sh @@ -10,7 +10,10 @@ check() { # called by dracut depends() { - echo dbus bash net-lib kernel-network-modules initqueue + echo bash net-lib kernel-network-modules initqueue + if dracut_module_included systemd; then + echo dbus + fi return 0 } -- 2.47.3