diff options
| -rwxr-xr-x | meta/recipes-graphics/wayland/weston-init/weston-start | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start index 01670cd4f5..3b13a0047a 100755 --- a/meta/recipes-graphics/wayland/weston-init/weston-start +++ b/meta/recipes-graphics/wayland/weston-init/weston-start | |||
| @@ -58,14 +58,19 @@ fi | |||
| 58 | 58 | ||
| 59 | if test -z "$XDG_RUNTIME_DIR"; then | 59 | if test -z "$XDG_RUNTIME_DIR"; then |
| 60 | export XDG_RUNTIME_DIR=/run/user/`id -u ${WESTON_USER}` | 60 | export XDG_RUNTIME_DIR=/run/user/`id -u ${WESTON_USER}` |
| 61 | if ! test -d "$XDG_RUNTIME_DIR"; then | 61 | if test -d "$XDG_RUNTIME_DIR"; then |
| 62 | mkdir --parents $XDG_RUNTIME_DIR | 62 | # Check permissions on existing directory |
| 63 | chmod 0700 $XDG_RUNTIME_DIR | 63 | if [ "$(stat -c %u-%a "$XDG_RUNTIME_DIR")" != "$(id -u ${WESTON_USER})-700" ]; then |
| 64 | fi | 64 | echo "ERROR: $XDG_RUNTIME_DIR has incorrect permissions" |
| 65 | if [ -n "$WESTON_USER" ] | 65 | exit 1 |
| 66 | then | 66 | fi |
| 67 | chown $WESTON_USER:$WESTON_GROUP $XDG_RUNTIME_DIR | 67 | else |
| 68 | mkdir --mode 0700 --parents $XDG_RUNTIME_DIR | ||
| 69 | if [ -n "$WESTON_USER" ] | ||
| 70 | then | ||
| 71 | chown $WESTON_USER:$WESTON_GROUP $XDG_RUNTIME_DIR | ||
| 72 | fi | ||
| 68 | fi | 73 | fi |
| 69 | fi | 74 | fi |
| 70 | 75 | ||
| 71 | su -c "XDG_RUNTIME_DIR=/run/user/`id -u ${WESTON_USER}` weston $weston_args --log=/tmp/weston.log" $WESTON_USER | 76 | su -c "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR weston $weston_args --log=/tmp/weston.log" $WESTON_USER |
