diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2023-12-25 13:22:45 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2024-04-11 09:45:22 +0200 |
commit | 101bb917159e3c1fb15e3f18e45dc449f78a3e31 (patch) | |
tree | 0a4ed6567f360dee5c5da88a0e8393a1a2e6ce8b /recipes-graphics | |
parent | bbada14657006718ebc3568e762c293369fe0098 (diff) |
weston-init: only modify systemd service if it exists
weston.service and weston.socket are now only deployed if systemd is in
distro features. (OE commit 00e3eb3893 ("weston-init: guard against
systemd configs")
Make their modification also conditionally on the feature.
Fixes Toradex Easy Installer build which doesn't use systemd as
the init manager.
Related-to: TEI-1063
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-graphics')
-rw-r--r-- | recipes-graphics/wayland/weston-init.bbappend | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index 6baccf4..a7b7710 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -12,11 +12,13 @@ PACKAGECONFIG:append:upstream:colibri-imx7-emmc = " use-pixman" do_install:append:tdx() { install -Dm0755 ${WORKDIR}/weston.sh ${D}${sysconfdir}/profile.d/weston.sh - # We need run weston systemd service with root user, or else it could not - # access input devices and GPU acceleration hardwares - # Reference: https://source.codeaurora.org/external/imx/meta-imx/commit/?h=hardknott-5.10.72-2.2.0&id=9e08be758765d4a991e0a440f8abef225be094e3 - sed -i "s/User=weston/User=root/" ${D}${systemd_system_unitdir}/weston.service - sed -i "s/Group=weston/Group=root/" ${D}${systemd_system_unitdir}/weston.service - sed -i "s/SocketUser=weston/SocketUser=root/" ${D}${systemd_system_unitdir}/weston.socket - sed -i "s/SocketGroup=wayland/SocketGroup=root/" ${D}${systemd_system_unitdir}/weston.socket + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + # We need run weston systemd service with root user, or else it could not + # access input devices and GPU acceleration hardwares + # Reference: https://source.codeaurora.org/external/imx/meta-imx/commit/?h=hardknott-5.10.72-2.2.0&id=9e08be758765d4a991e0a440f8abef225be094e3 + sed -i "s/User=weston/User=root/" ${D}${systemd_system_unitdir}/weston.service + sed -i "s/Group=weston/Group=root/" ${D}${systemd_system_unitdir}/weston.service + sed -i "s/SocketUser=weston/SocketUser=root/" ${D}${systemd_system_unitdir}/weston.socket + sed -i "s/SocketGroup=wayland/SocketGroup=root/" ${D}${systemd_system_unitdir}/weston.socket + fi } |