weston-init: restore profile script to previous implementation
This is a partial revert of commit 3819ee6672.
NXP simplified the profile script when updating to hardknott-5.10.72-2.2.0, but
since the /run/user/0 directory isn't automatically created in sysvinit
environments, the weston desktop fails to start in these cases. The previous
version of the script automatically creates said directory if it's missing, so
use that version instead.
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
parent
771d5af74c
commit
3a62855de4
|
|
@ -1,9 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Set XDG_RUNTIME_DIR manually.
|
# Digi: use old version of the script to ensure weston starts correctly on
|
||||||
# The variable is not set for ssh login, causing app failures. It's not clear
|
# sysvinit
|
||||||
# if this is an error or by design, but setting it manually does help and
|
|
||||||
# doesn't seem to hurt...
|
|
||||||
if test -z "$XDG_RUNTIME_DIR"; then
|
if test -z "$XDG_RUNTIME_DIR"; then
|
||||||
export XDG_RUNTIME_DIR=/run/user/`id -u`
|
export XDG_RUNTIME_DIR=/run/user/`id -u ${WESTON_USER}`
|
||||||
|
if ! test -d "$XDG_RUNTIME_DIR"; then
|
||||||
|
mkdir --parents $XDG_RUNTIME_DIR
|
||||||
|
chmod 0700 $XDG_RUNTIME_DIR
|
||||||
|
fi
|
||||||
|
if [ -n "$WESTON_USER" ]
|
||||||
|
then
|
||||||
|
chown $WESTON_USER:$WESTON_USER $XDG_RUNTIME_DIR
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue