fastboot: xserver-nodm-init: Start at 05.
authorChia-I Wu <olv@openmoko.com>
Tue, 28 Oct 2008 11:17:00 +0000 (19:17 +0800)
committerJohn Lee <john_lee@openmoko.org>
Mon, 12 Jan 2009 06:30:12 +0000 (14:30 +0800)
Also remove unnecessary fork since /etc/X11/Xserver is always
backgrounded.

packages/xserver-kdrive-common/xserver-nodm-init.bb
packages/xserver-kdrive-common/xserver-nodm-init/xserver-nodm

index bea2179..cba56d5 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "Simple Xserver Init Script (no dm)"
 LICENSE = "GPL"
 SECTION = "x11"
 PRIORITY = "optional"
-PR = "r9"
+PR = "r10"
 
 SRC_URI = "file://xserver-nodm"
 S = ${WORKDIR}
@@ -18,4 +18,13 @@ do_install() {
 inherit update-rc.d
 
 INITSCRIPT_NAME = "xserver-nodm"
-INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
+# start earlier under the assumption that xserver takes seconds to start
+INITSCRIPT_PARAMS = "start 5 5 2 . stop 20 0 1 6 ."
+
+pkg_postinst_${PN} () {
+if test "x$D" = "x"; then
+       for f in `ls /etc/rc?.d/S99${INITSCRIPT_NAME} 2>/dev/null`; do
+               mv $f `dirname $f`/S05${INITSCRIPT_NAME}
+       done
+fi
+}
index 2251c6a..28ba65c 100755 (executable)
@@ -19,18 +19,13 @@ 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
-       [ -z $LOGNAME ] && export LOGNAME=root && export HOME=/home/root
-       [ -z $HOME ] && export HOME=/home/$LOGNAME
-
-
-       echo "Starting Xserver"
-       /etc/X11/Xserver &
-    fi 
+        . /etc/profile
+        [ -z $LOGNAME ] && export LOGNAME=root && export HOME=/home/root
+        [ -z $HOME ] && export HOME=/home/$LOGNAME
+
+
+        echo "Starting Xserver"
+        /etc/X11/Xserver &
   ;;
 
   stop)