diff options
author | Randolph Sapp <rs@ti.com> | 2023-06-14 10:33:30 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-15 08:00:41 +0100 |
commit | 3cd202d7df753547959ecd18d1fa9d07a7566e08 (patch) | |
tree | 2c0731944c95549c6861b8f3c5dca572e78382f3 /meta/recipes-graphics/wayland | |
parent | 3a4a789482b71f03f37ad24625636d85b7586716 (diff) | |
download | poky-3cd202d7df753547959ecd18d1fa9d07a7566e08.tar.gz |
weston-init: guard against systemd configs
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.
(From OE-Core rev: 00e3eb3893eeb32839e02b05bc1299440895a53d)
Signed-off-by: Randolph Sapp <rs@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/wayland')
-rw-r--r-- | meta/recipes-graphics/wayland/weston-init.bb | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index e538469a58..9d892d58f2 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb | |||
@@ -26,27 +26,32 @@ DEFAULTBACKEND ??= "" | |||
26 | DEFAULTBACKEND:qemuall ?= "drm" | 26 | DEFAULTBACKEND:qemuall ?= "drm" |
27 | 27 | ||
28 | do_install() { | 28 | do_install() { |
29 | # Install weston-start script | ||
29 | if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then | 30 | if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then |
31 | install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start | ||
32 | sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start | ||
33 | sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start | ||
30 | install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston | 34 | install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston |
31 | sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston | 35 | sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston |
32 | fi | 36 | fi |
33 | install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini | ||
34 | install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston | ||
35 | 37 | ||
36 | # Install Weston systemd service and accompanying udev rule | 38 | # Install Weston systemd service and accompanying udev rule |
37 | install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service | 39 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
38 | install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket | 40 | install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service |
41 | install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket | ||
42 | sed -i -e s:/etc:${sysconfdir}:g \ | ||
43 | -e s:/usr/bin:${bindir}:g \ | ||
44 | -e s:/var:${localstatedir}:g \ | ||
45 | ${D}${systemd_system_unitdir}/weston.service | ||
46 | fi | ||
47 | |||
39 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then | 48 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then |
40 | install -D -p -m0644 ${WORKDIR}/weston-autologin ${D}${sysconfdir}/pam.d/weston-autologin | 49 | install -D -p -m0644 ${WORKDIR}/weston-autologin ${D}${sysconfdir}/pam.d/weston-autologin |
41 | fi | 50 | fi |
42 | sed -i -e s:/etc:${sysconfdir}:g \ | 51 | |
43 | -e s:/usr/bin:${bindir}:g \ | 52 | install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini |
44 | -e s:/var:${localstatedir}:g \ | 53 | install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston |
45 | ${D}${systemd_system_unitdir}/weston.service | 54 | |
46 | # Install weston-start script | ||
47 | install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start | ||
48 | sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start | ||
49 | sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start | ||
50 | if [ -n "${DEFAULTBACKEND}" ]; then | 55 | if [ -n "${DEFAULTBACKEND}" ]; then |
51 | sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini | 56 | sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini |
52 | fi | 57 | fi |