diff options
| author | Saul Wold <sgw@linux.intel.com> | 2013-02-21 08:11:50 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-28 23:15:49 +0000 |
| commit | 3312a2fd9097636fccd7c439369926a806956221 (patch) | |
| tree | 76a5220f13b571b092a949b271411deb6a146cc0 | |
| parent | 16e8d79ba4c3db1bc6e8242cf2eee9c853a4b6c6 (diff) | |
| download | poky-3312a2fd9097636fccd7c439369926a806956221.tar.gz | |
mini-x-session: Fix starting of x-session
We need to use sudo semantics since it does not start correctly
with su. Added RDEPENDS to ensure it's present on target.
The SESSION_DIR test was constructed incorrectly, so fixed it.
(From OE-Core rev: badf3a32b9737f2ad6f9c9ff2fe623fe17295946)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-graphics/mini-x-session/files/mini-x-session | 5 | ||||
| -rw-r--r-- | meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb | 2 |
2 files changed, 5 insertions, 2 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 91f1592c25..dca655a913 100644 --- a/meta/recipes-graphics/mini-x-session/files/mini-x-session +++ b/meta/recipes-graphics/mini-x-session/files/mini-x-session | |||
| @@ -17,13 +17,14 @@ exec /etc/mini_x/session | |||
| 17 | fi | 17 | fi |
| 18 | 18 | ||
| 19 | MINI_X_SESSION_DIR=/etc/mini_x/session.d | 19 | MINI_X_SESSION_DIR=/etc/mini_x/session.d |
| 20 | if [ -d "$MINI_X_SESSION_DIR"]; then | 20 | if [ -d "$MINI_X_SESSION_DIR" ]; then |
| 21 | # Execute session file on behalf of file owner | 21 | # Execute session file on behalf of file owner |
| 22 | find $MINI_X_SESSION_DIR -type f | while read SESSIONFILE; do | 22 | find $MINI_X_SESSION_DIR -type f | while read SESSIONFILE; do |
| 23 | set +e | 23 | set +e |
| 24 | USERNAME=`stat -c %U $SESSIONFILE` | 24 | USERNAME=`stat -c %U $SESSIONFILE` |
| 25 | # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211] | 25 | # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211] |
| 26 | su -l -c '$SESSIONFILE&' $USERNAME | 26 | # su -l -c '$SESSIONFILE&' $USERNAME |
| 27 | sudo -b -i -u $USERNAME $SESSIONFILE& | ||
| 27 | set -e | 28 | set -e |
| 28 | done | 29 | done |
| 29 | fi | 30 | fi |
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 8106cbbf55..3819ee350e 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 | |||
| @@ -13,6 +13,8 @@ RCONFLICTS_${PN} = "matchbox-common" | |||
| 13 | SRC_URI = "file://mini-x-session" | 13 | SRC_URI = "file://mini-x-session" |
| 14 | S = "${WORKDIR}" | 14 | S = "${WORKDIR}" |
| 15 | 15 | ||
| 16 | RDEPENDS_${PN} = "sudo" | ||
| 17 | |||
| 16 | inherit update-alternatives | 18 | inherit update-alternatives |
| 17 | 19 | ||
| 18 | ALTERNATIVE_${PN} = "x-session-manager" | 20 | ALTERNATIVE_${PN} = "x-session-manager" |
