[oe-commits] Chia-I Wu : fastboot: sysvinit: Simplify rc and rcS.

GIT User account git at amethyst.openembedded.net
Wed Dec 17 12:56:44 UTC 2008


Module: openembedded.git
Branch: john_lee/openmoko-merges
Commit: 4974eeafa32bf0ed4bca24138120639bfcfe866e
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=4974eeafa32bf0ed4bca24138120639bfcfe866e

Author: Chia-I Wu <olv at openmoko.com>
Date:   Tue Oct 28 16:48:44 2008 +0800

fastboot: sysvinit: Simplify rc and rcS.

Remove support for boot splash.  Source initscripts end with .sh.

---

 packages/sysvinit/sysvinit/openmoko/rc  |   79 +-----------------------------
 packages/sysvinit/sysvinit/openmoko/rcS |    9 ++++
 2 files changed, 12 insertions(+), 76 deletions(-)

diff --git a/packages/sysvinit/sysvinit/openmoko/rc b/packages/sysvinit/sysvinit/openmoko/rc
index 9d28a68..1c2c79b 100644
--- a/packages/sysvinit/sysvinit/openmoko/rc
+++ b/packages/sysvinit/sysvinit/openmoko/rc
@@ -18,23 +18,6 @@
 . /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
index 0000000..08dca5d
--- /dev/null
+++ b/packages/sysvinit/sysvinit/openmoko/rcS
@@ -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 at cistron.nl
+#
+
+exec /etc/init.d/rc S





More information about the Openembedded-commits mailing list