From: Andrew Gunnerson Date: Sun, 6 Jul 2025 04:21:53 +0000 (-0400) Subject: fix(network-manager): depend on dbus only when using systemd X-Git-Tag: 108~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58baf86;p=thirdparty%2Fdracut-ng.git 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 --- 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 }