summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-04-02 22:28:05 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2018-04-02 22:28:05 +0000
commitea00cb6f79616987d7e3c7e83a6ee01cb73eb170 (patch)
treeb8c022dfa385c089698238ddfa39715541fc8e44
parent5a81ed69442268620b31fa8fe7f687c45c811e60 (diff)
parent36a9734e1914e08351d5150cb3fbfe0d51553dad (diff)
Merge "weston-init: Ensure setting of the user"
-rw-r--r--meta-agl/recipes-graphics/wayland/weston-init.bbappend8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta-agl/recipes-graphics/wayland/weston-init.bbappend b/meta-agl/recipes-graphics/wayland/weston-init.bbappend
index 01984a13c..1ca63b5de 100644
--- a/meta-agl/recipes-graphics/wayland/weston-init.bbappend
+++ b/meta-agl/recipes-graphics/wayland/weston-init.bbappend
@@ -17,7 +17,15 @@ do_install_append() {
sed -i "/\[Service\]/r ${S}/weston.service.add" \
${D}${systemd_system_unitdir}/weston.service
+ if ! grep -q '^Group=' ${D}${systemd_system_unitdir}/weston.service; then
+ sed -i "/\[Service\]/aGroup=root" ${D}${systemd_system_unitdir}/weston.service
+ fi
+ if ! grep -q '^User=' ${D}${systemd_system_unitdir}/weston.service; then
+ sed -i "/\[Service\]/aUser=root" ${D}${systemd_system_unitdir}/weston.service
+ fi
+
sed -e 's,User=root,User=${WESTONUSER},g' \
+ -e 's,Group=root,Group=${WESTONGROUP},g' \
-e 's,ExecStart=.*,ExecStart=${WESTONSTART},g' \
-e 's,@WESTONTTY@,${WESTONTTY},g' \
-e 's,@XDG_RUNTIME_DIR@,${DISPLAY_XDG_RUNTIME_DIR},g' \