]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
rpcbind: Remove IPv6 listener, if ipv6 not in DISTRO_FEATURES
authorJörg Sommer <joerg.sommer@navimatix.de>
Sat, 28 Mar 2026 21:18:57 +0000 (22:18 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Apr 2026 11:02:54 +0000 (12:02 +0100)
Remove in all systemd socket files all Listen on IPv6 addresses, if IPv6 is
not available. Otherwise systemd warns about "Binding to IPv6 address not
available since kernel does not support IPv6."

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/rpcbind/rpcbind_1.2.8.bb

index bcdadf4f108341ea5647b552b3fa2487053e15d9..bd8ba1e88afe7f5c57a1a6ee1aa2fb8179ed8343 100644 (file)
@@ -54,6 +54,11 @@ do_install:append () {
 
        install -d ${D}${systemd_system_unitdir}/rpcbind.service.d
        install -m 0644 ${UNPACKDIR}/rpcbind.systemd ${D}${systemd_system_unitdir}/rpcbind.service.d/rpcbind.conf
+
+       if ! ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'true', 'false', d)}
+       then
+               sed -i '/^Listen.*=\[.*\]/s/^/# /' ${D}${systemd_system_unitdir}/*.socket
+       fi
 }
 
 FILES:${PN} += "${systemd_system_unitdir}/rpcbind.service.d/rpcbind.conf"