diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2016-06-09 14:27:06 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-12 23:47:17 +0100 |
commit | a6da50648378a54fb9770ed5700fb44e8a7be2f1 (patch) | |
tree | e230279d762b498a9450948a03a31e99234735f2 | |
parent | 7950a90bcc6865236b55fcc9559f3d8327d65b3c (diff) | |
download | poky-a6da50648378a54fb9770ed5700fb44e8a7be2f1.tar.gz |
weston-init: Don't change XDG_RUNTIME_DIR if it already exists
In the case that XDG_RUNTIME_DIR already exists, the mkdir --parents
at least does nothing, but the chmod could overwrite the desired
file mode settings.
(From OE-Core rev: 9f539d03138817b7b740ed1895000704e4a475d0)
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | meta/recipes-graphics/wayland/weston-init/weston-start | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start index 4b41576103..5b7604f930 100755 --- a/meta/recipes-graphics/wayland/weston-init/weston-start +++ b/meta/recipes-graphics/wayland/weston-init/weston-start | |||
@@ -65,8 +65,10 @@ fi | |||
65 | 65 | ||
66 | if test -z "$XDG_RUNTIME_DIR"; then | 66 | if test -z "$XDG_RUNTIME_DIR"; then |
67 | export XDG_RUNTIME_DIR=/run/user/`id -u` | 67 | export XDG_RUNTIME_DIR=/run/user/`id -u` |
68 | mkdir --parents $XDG_RUNTIME_DIR | 68 | if ! test -d "$XDG_RUNTIME_DIR"; then |
69 | chmod 0700 $XDG_RUNTIME_DIR | 69 | mkdir --parents $XDG_RUNTIME_DIR |
70 | chmod 0700 $XDG_RUNTIME_DIR | ||
71 | fi | ||
70 | fi | 72 | fi |
71 | 73 | ||
72 | exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log | 74 | exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log |