]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
systemd: if getty generator is disabled remove the generator, not the units
authorRoss Burton <ross.burton@arm.com>
Mon, 3 Mar 2025 16:15:26 +0000 (16:15 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Mar 2025 11:16:41 +0000 (11:16 +0000)
If the getty generator is disabled then it's neater to remove just the
generator tool instead of the unit files as the unit files are still
useful.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/systemd/systemd_257.3.bb

index 324e91e0515092a0c44f9dd719fa23a0538d84aa..64fb8fe69ac592db3c84653fa56791776ccba186 100644 (file)
@@ -287,9 +287,11 @@ do_install() {
                fi
        fi
        install -d ${D}/${base_sbindir}
-       if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
-               # Provided by a separate recipe
-               rm ${D}${systemd_system_unitdir}/serial-getty* -f
+
+       if ! ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'true', 'false', d)}; then
+               # Remove the serial-getty generator and instead use explicit services
+               # created by the systemd-serialgetty recipe
+               find ${D} -name \*getty-generator\* -delete
        fi
 
        # Provide support for initramfs