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.
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
if test -z "$XDG_RUNTIME_DIR"; then
export XDG_RUNTIME_DIR=/run/user/`id -u`
- mkdir --parents $XDG_RUNTIME_DIR
- chmod 0700 $XDG_RUNTIME_DIR
+ if ! test -d "$XDG_RUNTIME_DIR"; then
+ mkdir --parents $XDG_RUNTIME_DIR
+ chmod 0700 $XDG_RUNTIME_DIR
+ fi
fi
exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log