fastboot: sysvinit: Simplify rc and rcS.
authorChia-I Wu <olv@openmoko.com>
Tue, 28 Oct 2008 08:48:44 +0000 (16:48 +0800)
committerJohn Lee <john_lee@openmoko.org>
Mon, 12 Jan 2009 06:29:55 +0000 (14:29 +0800)
Remove support for boot splash.  Source initscripts end with .sh.

packages/sysvinit/sysvinit/openmoko/rc
packages/sysvinit/sysvinit/openmoko/rcS [new file with mode: 0644]
packages/sysvinit/sysvinit_2.86.bb

index 9d28a68..1c2c79b 100644 (file)
 . /etc/default/rcS
 export VERBOSE
 
-startup_progress() {
-    step=$(($step + $step_change))
-    if [ "$num_steps" != "0" ]; then
-        progress=$((($step * $progress_size / $num_steps) + $first_step))
-    else
-        progress=$progress_size
-    fi
-    #echo "PROGRESS is $progress $runlevel $first_step + ($step of $num_steps) $step_change $progress_size"
-# FIXME: this should be virtualised and come from a generic boot splash script
-# provided by some generic splash handler - be it psplash, exquisite or
-# whatever else soa  simple install of one splash instead of another works
-    if type exquisite-write >/dev/null 2>&1; then
-         EXQUISITE_IPC=/mnt/.exquisite/exquisite exquisite-write "PROGRESS $progress" || true
-    fi
-}
-
-
 #
 # Start script or program.
 #
@@ -45,18 +28,14 @@ startup() {
   case "$1" in
        *.sh)
                # Source shell script for speed.
-               (
-                       trap - INT QUIT TSTP
-                       scriptname=$1
-                       shift
-                       . $scriptname
-               )
+               scriptname=$1
+               shift
+               . $scriptname
                ;;
        *)
                "$@"
                ;;
   esac
-  startup_progress
 }
 
   # Ignore CTRL-C only in this shell, so we can interrupt subprocesses.
@@ -83,48 +62,6 @@ startup() {
   # Is there an rc directory for this new runlevel?
   if [ -d /etc/rc$runlevel.d ]
   then
-       # Find out where in the progress bar the initramfs got to.
-       PROGRESS_STATE=0
-       #if [ -f /dev/.initramfs/progress_state ]; then
-       #    . /dev/.initramfs/progress_state
-       #fi
-
-       # Split the remaining portion of the progress bar into thirds
-       progress_size=$(((100 - $PROGRESS_STATE) / 3))
-
-       case "$runlevel" in
-               0|6)
-                       # Count down from -100 to 0 and use the entire bar
-                       first_step=-100
-                       progress_size=100
-                       step_change=1
-                       ;;
-               S)
-                       # Begin where the initramfs left off and use 2/3
-                       # of the remaining space
-                       first_step=$PROGRESS_STATE
-                       progress_size=$(($progress_size * 2))
-                       step_change=1
-                       ;;
-               *)
-                       # Begin where rcS left off and use the final 1/3 of
-                       # the space (by leaving progress_size unchanged)
-                       first_step=$(($progress_size * 2 + $PROGRESS_STATE))
-                       step_change=1
-                       ;;
-       esac
-
-       num_steps=0
-       for s in /etc/rc$runlevel.d/[SK]*; do
-            case "${s##/etc/rc$runlevel.d/S??}" in
-                gdm|xdm|kdm|reboot|halt)
-                    break
-                    ;;
-            esac
-            num_steps=$(($num_steps + 1))
-        done
-        step=0
-
        # First, run the KILL scripts.
        if [ $previous != N ]
        then
@@ -169,13 +106,3 @@ startup() {
                esac
        done
   fi
-
-  # FIXME: this should be virtualised and come from a generic boot splash script
-  # provided by some generic splash handler - be it psplash, exquisite or
-  # whatever else soa  simple install of one splash instead of another works
-  if [ "x$runlevel" != "xS" ]; then
-       if type exquisite-write >/dev/null 2>&1; then
-               EXQUISITE_IPC=/mnt/.exquisite/exquisite exquisite-write "QUIT" || true
-               umount /mnt/.exquisite
-       fi
-  fi
diff --git a/packages/sysvinit/sysvinit/openmoko/rcS b/packages/sysvinit/sysvinit/openmoko/rcS
new file mode 100644 (file)
index 0000000..08dca5d
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+# rcS          Call all S??* scripts in /etc/rcS.d in
+#              numerical/alphabetical order.
+#
+# Version:     @(#)/etc/init.d/rcS  2.76  19-Apr-1999  miquels@cistron.nl
+#
+
+exec /etc/init.d/rc S
index a7699f1..6e6f98c 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "System-V like init."
 SECTION = "base"
 LICENSE = "GPL"
 HOMEPAGE = "http://freshmeat.net/projects/sysvinit/"
-PR = "r45"
+PR = "r46"
 
 # USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf.
 # Set PACKAGE_ARCH appropriately.