From c90f0128555752cd065eaebcd91e1851a0d453b6 Mon Sep 17 00:00:00 2001 From: Zhixiong Chi Date: Wed, 8 Apr 2026 09:17:40 +0000 Subject: [PATCH] networkmanager: Do not ship initrd specific services into rootfs Those systemd services were added in 1.54 upstream https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2089 According the comments we can see they are meant for the inird other than using for rootfs. They will conflict with the main services and can lead to potentially confusing error messages. So remove them for now to avoid the following issue. >$systemd-analyze --man=false verify \ > /lib/systemd/system/NetworkManager-wait-online-initrd.service Failed to put bus name to hashmap: File exists NetworkManager-initrd.service: Two services allocated for the \ same bus name org.freedesktop.NetworkManager, refusing operation. Test: PASS: bitbake core-image-minimal PASS: runqemu qemux86-64 PASS: systemd-analyze --man=false verify \ /lib/systemd/system/NetworkManager.service Signed-off-by: Zhixiong Chi Signed-off-by: Khem Raj --- .../networkmanager/networkmanager_1.56.0.bb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.56.0.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.56.0.bb index f9fc9f3966..b04ad90738 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.56.0.bb +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.56.0.bb @@ -311,4 +311,9 @@ do_install:append() { if ${@bb.utils.contains('PACKAGECONFIG','dhcpcd','true','false',d)}; then install -Dm 0644 ${UNPACKDIR}/enable-dhcpcd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-dhcpcd.conf fi + + # Don't ship initrd specific services into rootfs to avoid the conflict with the main services + rm -f ${D}${systemd_system_unitdir}/NetworkManager-config-initrd.service + rm -f ${D}${systemd_system_unitdir}/NetworkManager-initrd.service + rm -f ${D}${systemd_system_unitdir}/NetworkManager-wait-online-initrd.service }