diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2013-02-01 00:36:15 -0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-01 15:42:52 +0000 |
commit | 84b58ed421fd14796ddcbc4cc7fc13a5a098d6cc (patch) | |
tree | 7fb5723e949ac250c904299f85b2f66fddd96501 | |
parent | 283dd547b5ed657f871b9330ff4d8d5b3afd1e32 (diff) | |
download | openembedded-core-84b58ed421fd14796ddcbc4cc7fc13a5a098d6cc.tar.gz openembedded-core-84b58ed421fd14796ddcbc4cc7fc13a5a098d6cc.tar.bz2 openembedded-core-84b58ed421fd14796ddcbc4cc7fc13a5a098d6cc.zip |
mini-x-session: Fix runtime when using without session contents
The script where behaving badly when the session directory does not
exist and also lacking a dependency to 'sudo'. Instead of adding a
dependency on 'sudo' we use 'su' as done in xserver-common.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-graphics/mini-x-session/files/mini-x-session | 18 | ||||
-rw-r--r-- | meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb | 2 |
2 files changed, 11 insertions, 9 deletions
diff --git a/meta/recipes-graphics/mini-x-session/files/mini-x-session b/meta/recipes-graphics/mini-x-session/files/mini-x-session index f7d6c3bdb1..91f1592c25 100644 --- a/meta/recipes-graphics/mini-x-session/files/mini-x-session +++ b/meta/recipes-graphics/mini-x-session/files/mini-x-session @@ -17,14 +17,16 @@ exec /etc/mini_x/session fi MINI_X_SESSION_DIR=/etc/mini_x/session.d - -# Execute session file on behalf of file owner -for SESSIONFILE in $MINI_X_SESSION_DIR/*; do - set +e - USERNAME=`stat -c %U $SESSIONFILE` - sudo -b -i -u $USERNAME $SESSIONFILE& - set -e -done +if [ -d "$MINI_X_SESSION_DIR"]; then + # Execute session file on behalf of file owner + find $MINI_X_SESSION_DIR -type f | while read SESSIONFILE; do + set +e + USERNAME=`stat -c %U $SESSIONFILE` + # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211] + su -l -c '$SESSIONFILE&' $USERNAME + set -e + done +fi # This resolution is big enough for hob2's max window size. xrandr -s 1024x768 diff --git a/meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb b/meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb index 6f7efb2560..8106cbbf55 100644 --- a/meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb +++ b/meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb @@ -2,7 +2,7 @@ DESCRIPTION = "Mini X session files for poky" HOMEPAGE = "http://www.yoctoproject.org" BUGTRACKER = "http://bugzilla.pokylinux.org" -PR = "r3" +PR = "r4" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://mini-x-session;endline=5;md5=b6430bffbcf05f9760e72938826b7487" |