public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Richard Leitner" <richard.leitner@skidata.com>
To: openembedded-core@lists.openembedded.org
Cc: Richard Leitner <richard.leitner@skidata.com>
Subject: [PATCH] weston-init: introduce WESTON_GROUP
Date: Wed,  4 Nov 2020 15:25:32 +0100	[thread overview]
Message-ID: <20201104142532.73949-1-dev@bubus.at> (raw)

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


                 reply	other threads:[~2020-11-04 14:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201104142532.73949-1-dev@bubus.at \
    --to=richard.leitner@skidata.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox