From: Ross Burton Date: Mon, 3 Mar 2025 16:15:26 +0000 (+0000) Subject: systemd: if getty generator is disabled remove the generator, not the units X-Git-Tag: 2025-04-walnascar~346 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2beb3170af6;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git systemd: if getty generator is disabled remove the generator, not the units 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 Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-core/systemd/systemd_257.3.bb b/meta/recipes-core/systemd/systemd_257.3.bb index 324e91e0515..64fb8fe69ac 100644 --- a/meta/recipes-core/systemd/systemd_257.3.bb +++ b/meta/recipes-core/systemd/systemd_257.3.bb @@ -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