* [PATCH] weston-init: introduce WESTON_GROUP
@ 2020-11-04 14:25 Richard Leitner
0 siblings, 0 replies; only message in thread
From: Richard Leitner @ 2020-11-04 14:25 UTC (permalink / raw)
To: openembedded-core; +Cc: Richard Leitner
From: Richard Leitner <richard.leitner@skidata.com>
Currently the WESTON_USER variable is used as user and group name for
chown'ing XDG_RUNTIME_DIR. If WESTON_USER has no group with the same
name this fails.
Therefore add a new WESTON_GROUP variable which is set to WESTON_USER if
not specified to ensure backwards compatibility.
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
---
meta/recipes-graphics/wayland/weston-init/weston-start | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start
index ccc7093425..0b93dc964a 100755
--- a/meta/recipes-graphics/wayland/weston-init/weston-start
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -33,6 +33,10 @@ if [ -n "$WESTON_USER" ]; then
echo "ERROR: If you have WESTON_USER variable set, you also need WESTON_TTY."
exit 1
fi
+ if [ -z "$WESTON_GROUP" ]; then
+ # no explicit WESTON_GROUP given, therefore use WESTON_USER
+ export WESTON_GROUP="${WESTON_USER}"
+ fi
weston_args_user="-u $WESTON_USER -t $WESTON_TTY"
fi
@@ -75,7 +79,7 @@ if test -z "$XDG_RUNTIME_DIR"; then
fi
if [ -n "$WESTON_USER" ]
then
- chown $WESTON_USER:$WESTON_USER $XDG_RUNTIME_DIR
+ chown $WESTON_USER:$WESTON_GROUP $XDG_RUNTIME_DIR
fi
fi
--
2.28.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-04 14:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-04 14:25 [PATCH] weston-init: introduce WESTON_GROUP Richard Leitner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox