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 <accounts+github@chiller3.com>
# 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
}