Rather than adding a default.target in /etc/systemd/system, modify the one in /usr/lib/systemd/system.
Signed-off-by: Peter Kjellerstedt <peter.kjellerst...@axis.com> --- meta/classes/rootfs-postcommands.bbclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index a3f96ef7ed..713ae5bfe0 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass @@ -218,8 +218,9 @@ postinst_enable_logging () { # Modify systemd default target # set_systemd_default_target () { - if [ -d ${IMAGE_ROOTFS}${sysconfdir}/systemd/system -a -e ${IMAGE_ROOTFS}${systemd_system_unitdir}/${SYSTEMD_DEFAULT_TARGET} ]; then - ln -sf ${systemd_system_unitdir}/${SYSTEMD_DEFAULT_TARGET} ${IMAGE_ROOTFS}${sysconfdir}/systemd/system/default.target + if [ "${SYSTEMD_DEFAULT_TARGET}" ] && + [ -e ${IMAGE_ROOTFS}${systemd_system_unitdir}/${SYSTEMD_DEFAULT_TARGET} ]; then + ln -sf ${SYSTEMD_DEFAULT_TARGET} ${IMAGE_ROOTFS}${systemd_system_unitdir}/default.target fi }
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160370): https://lists.openembedded.org/g/openembedded-core/message/160370 Mute This Topic: https://lists.openembedded.org/mt/88325758/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-