From: Randolph Sapp <r...@ti.com>

Just as sysvinit scripts shouldn't be present in a distro using systemd,
systemd scripts shouldn't be present in a system not using systemd.

Signed-off-by: Randolph Sapp <r...@ti.com>
Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org>
(cherry picked from commit 00e3eb3893eeb32839e02b05bc1299440895a53d)
Signed-off-by: Steve Sakoman <st...@sakoman.com>
---
 meta/recipes-graphics/wayland/weston-init.bb | 29 ++++++++++++--------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 6d1bf7a698..be6aef07af 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -25,27 +25,32 @@ DEFAULTBACKEND ??= ""
 DEFAULTBACKEND:qemuall ?= "drm"
 
 do_install() {
+       # Install weston-start script
        if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
+               install -Dm755 ${WORKDIR}/weston-start 
${D}${bindir}/weston-start
+               sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
+               sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' 
${D}${bindir}/weston-start
                install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
                sed -i 's#ROOTHOME#${ROOT_HOME}#' 
${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
 
        # Install Weston systemd service and accompanying udev rule
-       install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
-       install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+       if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
+               install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
+               install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+               sed -i -e s:/etc:${sysconfdir}:g \
+                       -e s:/usr/bin:${bindir}:g \
+                       -e s:/var:${localstatedir}:g \
+                       ${D}${systemd_system_unitdir}/weston.service
+       fi
+
        if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
                install -D -p -m0644 ${WORKDIR}/weston-autologin 
${D}${sysconfdir}/pam.d/weston-autologin
        fi
-       sed -i -e s:/etc:${sysconfdir}:g \
-               -e s:/usr/bin:${bindir}:g \
-               -e s:/var:${localstatedir}:g \
-               ${D}${systemd_system_unitdir}/weston.service
-       # Install weston-start script
-       install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
-       sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
-       sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
+
+       install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
+       install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
+
        if [ -n "${DEFAULTBACKEND}" ]; then
                sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
        fi
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183652): 
https://lists.openembedded.org/g/openembedded-core/message/183652
Mute This Topic: https://lists.openembedded.org/mt/99865958/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to