X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=meta-agl%2Frecipes-graphics%2Fwayland%2Fweston-init.bbappend;h=1ca63b5de8799ac50c4ad2a0266ca7325e620418;hb=44a90c741b36e7a13b86ae2b6caca8fc6cf8897a;hp=01984a13c86ed8675445e5c2101c1173308c7278;hpb=101e627e84b29a4370c26710e3e15353a7c02f2b;p=AGL%2Fmeta-agl.git 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' \