[OE-core] [oe-core][PATCHv2 25/30] xserver-nodm-init: merge some changes from meta-oe
Martin Jansa
martin.jansa at gmail.com
Mon Oct 3 13:28:56 UTC 2011
* /etc/X11/Xusername handling should be moved to x11-common so the same
username and logic is used from initscript and when user starts it
from terminal
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
.../x11-common/xserver-nodm-init/xserver-nodm | 30 ++++++--------------
1 files changed, 9 insertions(+), 21 deletions(-)
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
index c707a4b..9cd7904 100755
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
@@ -8,10 +8,7 @@
# Default-Stop: 0 1 6
### END INIT INFO
-killproc() { # kill the named process(es)
- pid=`/bin/pidof $1`
- [ "$pid" != "" ] && kill $pid
-}
+. /etc/init.d/functions
read CMDLINE < /proc/cmdline
for x in $CMDLINE; do
@@ -25,25 +22,16 @@ done
case "$1" in
start)
+ # We don't want this script to block the rest of the boot process
+ if [ "$2" != "background" ]; then
+ $0 $1 background &
+ else
. /etc/profile
- username=root
+
echo "Starting Xserver"
- if [ -f /etc/X11/Xusername ]; then
- username=`cat /etc/X11/Xusername`
- # setting for rootless X
- chmod o+w /var/log
- chmod g+r /dev/tty[0-3]
- chmod o+rw /dev/input/*
- # hidraw device is probably needed
- if [ -e /dev/hidraw0 ]; then
- chmod o+rw /dev/hidraw*
- fi
- fi
- # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211]
- su -l -c '/etc/X11/Xserver&' $username
- # Wait for the desktop to say its finished loading
- # before loading the rest of the system
- # dbus-wait org.matchbox_project.desktop Loaded
+ . /etc/X11/xserver-common
+ xinit /etc/X11/Xsession -- `which $XSERVER` $ARGS >/var/log/Xsession.log 2>&1
+ fi
;;
stop)
--
1.7.7
More information about the Openembedded-core
mailing list