From a839c9ba881ea3fae06a3a4d85e27832a9b2762d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 9 Nov 2020 09:31:29 +0100 Subject: weston-init: correctly start under systemd Several issues are addressed: 1. weston requires pam when starting under systemd 2. systemd was attempting to launch weston twice (from sysvinit script and from systemd unit file) which caused confusion and errors. 3. runtime test should stop/start weston via systemd only if systemd actually controls system startup, not merely when systemd is present. (From OE-Core rev: 72dd74c5d384dbe641cc7c02ecf766ff8d5f555f) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/recipes-graphics/wayland/weston-init.bb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'meta/recipes-graphics/wayland') diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index b7a99be646..4b2a6ca983 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb @@ -26,7 +26,9 @@ DEFAULTBACKEND_qemux86 = "drm" DEFAULTBACKEND_qemux86-64 = "drm" do_install() { - install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston + if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then + install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston + fi install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston @@ -55,10 +57,13 @@ do_install() { fi } +INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}" + inherit update-rc.d features_check systemd # rdepends on weston which depends on virtual/egl -REQUIRED_DISTRO_FEATURES = "opengl" +# requires pam enabled if started via systemd +REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" RDEPENDS_${PN} = "weston kbd" -- cgit v1.2.3-54-g00ecf