[PATCH] fastboot: sysvinit: Simplify rc and rcS.
Chia-I Wu
olv at openmoko.com
Tue Oct 28 09:48:44 CET 2008
Remove support for boot splash. Source initscripts end with .sh.
---
packages/sysvinit/sysvinit/openmoko/rc | 70 +-----------------------------
packages/sysvinit/sysvinit/openmoko/rcS | 9 ++++
packages/sysvinit/sysvinit_2.86.bb | 2 +-
3 files changed, 13 insertions(+), 68 deletions(-)
create mode 100644 packages/sysvinit/sysvinit/openmoko/rcS
diff --git a/packages/sysvinit/sysvinit/openmoko/rc b/packages/sysvinit/sysvinit/openmoko/rc
index 463249d..1c2c79b 100644
--- a/packages/sysvinit/sysvinit/openmoko/rc
+++ b/packages/sysvinit/sysvinit/openmoko/rc
@@ -18,19 +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"
-
- splash-write "PROGRESS $progress" || true
-}
-
-
#
# Start script or program.
#
@@ -41,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.
@@ -79,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
@@ -165,8 +106,3 @@ startup() {
esac
done
fi
-
-if [ "x$runlevel" != "xS" ]; then
- splash-write "QUIT"
-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
diff --git a/packages/sysvinit/sysvinit_2.86.bb b/packages/sysvinit/sysvinit_2.86.bb
index 665c202..e34ab10 100644
--- a/packages/sysvinit/sysvinit_2.86.bb
+++ b/packages/sysvinit/sysvinit_2.86.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "System-V like init."
SECTION = "base"
LICENSE = "GPL"
HOMEPAGE = "http://freshmeat.net/projects/sysvinit/"
-PR = "r41.01"
+PR = "r41.02"
# USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf.
# Set PACKAGE_ARCH appropriately.
--
1.5.6.5
--zYM0uCDKw75PZbzx
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: inline; filename="0014-fastboot-base-files-Simplify-fstab.patch"
More information about the devel
mailing list