diff options
| author | Randolph Sapp <rs@ti.com> | 2023-06-14 10:33:30 -0500 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-07-04 05:32:29 -1000 |
| commit | 9008062ae84c4f331fda1c445fc71ae7aabfbf1a (patch) | |
| tree | 1b801b3b33e6785356c118d88e1d8fd2d8540e9a /meta/recipes-graphics | |
| parent | 916b3ccee1c041f2d31ea2cc436ff01ed4a4b177 (diff) | |
| download | poky-9008062ae84c4f331fda1c445fc71ae7aabfbf1a.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: 2617900f754572cca23e4db73b91a4091b921ac5)
Signed-off-by: Randolph Sapp <rs@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 00e3eb3893eeb32839e02b05bc1299440895a53d)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-graphics')
| -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 6d1bf7a698..be6aef07af 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb | |||
| @@ -25,27 +25,32 @@ DEFAULTBACKEND ??= "" | |||
| 25 | DEFAULTBACKEND:qemuall ?= "drm" | 25 | DEFAULTBACKEND:qemuall ?= "drm" |
| 26 | 26 | ||
| 27 | do_install() { | 27 | do_install() { |
| 28 | # Install weston-start script | ||
| 28 | if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then | 29 | if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then |
| 30 | install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start | ||
| 31 | sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start | ||
| 32 | sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start | ||
| 29 | install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston | 33 | install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston |
| 30 | sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston | 34 | sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston |
| 31 | fi | 35 | fi |
| 32 | install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini | ||
| 33 | install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston | ||
| 34 | 36 | ||
| 35 | # Install Weston systemd service and accompanying udev rule | 37 | # Install Weston systemd service and accompanying udev rule |
| 36 | install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service | 38 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 37 | install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket | 39 | install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service |
| 40 | install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket | ||
| 41 | sed -i -e s:/etc:${sysconfdir}:g \ | ||
| 42 | -e s:/usr/bin:${bindir}:g \ | ||
| 43 | -e s:/var:${localstatedir}:g \ | ||
| 44 | ${D}${systemd_system_unitdir}/weston.service | ||
| 45 | fi | ||
| 46 | |||
| 38 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then | 47 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then |
| 39 | install -D -p -m0644 ${WORKDIR}/weston-autologin ${D}${sysconfdir}/pam.d/weston-autologin | 48 | install -D -p -m0644 ${WORKDIR}/weston-autologin ${D}${sysconfdir}/pam.d/weston-autologin |
| 40 | fi | 49 | fi |
| 41 | sed -i -e s:/etc:${sysconfdir}:g \ | 50 | |
| 42 | -e s:/usr/bin:${bindir}:g \ | 51 | install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini |
| 43 | -e s:/var:${localstatedir}:g \ | 52 | install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston |
| 44 | ${D}${systemd_system_unitdir}/weston.service | 53 | |
| 45 | # Install weston-start script | ||
| 46 | install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start | ||
| 47 | sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start | ||
| 48 | sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start | ||
| 49 | if [ -n "${DEFAULTBACKEND}" ]; then | 54 | if [ -n "${DEFAULTBACKEND}" ]; then |
| 50 | sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini | 55 | sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini |
| 51 | fi | 56 | fi |
