summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2007-03-30 11:29:23 +0000
committerKoen Kooi <koen@openembedded.org>2007-03-30 11:29:23 +0000
commit6f13dc66f80d2aa264f58e88c905e63cc65158d1 (patch)
tree70f69a9aea1ef53f1ed94d24c4577d0ee784d4a0
parente2bbae32a7d4c8a5894e9938cd014bc9eb3e0065 (diff)
sysvinit: merge psplash reboot handling from poky
-rwxr-xr-xpackages/sysvinit/sysvinit/angstrom/rc54
-rw-r--r--packages/sysvinit/sysvinit_2.86.bb2
2 files changed, 27 insertions, 29 deletions
diff --git a/packages/sysvinit/sysvinit/angstrom/rc b/packages/sysvinit/sysvinit/angstrom/rc
index e43ddec14b..30b69ad516 100755
--- a/packages/sysvinit/sysvinit/angstrom/rc
+++ b/packages/sysvinit/sysvinit/angstrom/rc
@@ -1,5 +1,4 @@
#!/bin/sh
-
#
# rc This file is responsible for starting/stopping
# services when the runlevel changes.
@@ -21,13 +20,12 @@ export VERBOSE
startup_progress() {
step=$(($step + $step_change))
-
- if [ $(($num_steps + $first_step)) -lt 1 ]; then
- num_steps="1"
- first_step="0"
+ if [ "$num_steps" != "0" ]; then
+ progress=$((($step * $progress_size / $num_steps) + $first_step))
+ else
+ progress=$progress_size
fi
-
- progress=$(($step * $progress_size / $num_steps + $first_step))
+ #echo "PROGRESS is $progress $runlevel $first_step + ($step of $num_steps) $step_change $progress_size"
if type psplash-write >/dev/null 2>&1; then
TMPDIR=/mnt/.psplash psplash-write "PROGRESS $progress" || true
fi
@@ -93,10 +91,10 @@ startup() {
case "$runlevel" in
0|6)
- # Count down from 0 to -100 and use the entire bar
- first_step=0
+ # Count down from -100 to 0 and use the entire bar
+ first_step=-100
progress_size=100
- step_change=-1
+ step_change=1
;;
S)
# Begin where the initramfs left off and use 2/3
@@ -113,6 +111,17 @@ startup() {
;;
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
@@ -126,18 +135,6 @@ startup() {
done
fi
- 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
-
# Now run the START scripts for this runlevel.
for i in /etc/rc$runlevel.d/S*
do
@@ -170,9 +167,10 @@ startup() {
done
fi
-if [ "x$runlevel" != "xS" ]; then
- if type psplash-write >/dev/null 2>&1; then
- TMPDIR=/mnt/.psplash psplash-write "QUIT" || true
- umount /mnt/.psplash
- fi
-fi
+#Uncomment to cause psplash to exit manually, otherwise it exits when it sees a VC switch
+#if [ "x$runlevel" != "xS" ]; then
+# if type psplash-write >/dev/null 2>&1; then
+# TMPDIR=/mnt/.psplash psplash-write "QUIT" || true
+# umount /mnt/.psplash
+# fi
+#fi
diff --git a/packages/sysvinit/sysvinit_2.86.bb b/packages/sysvinit/sysvinit_2.86.bb
index a4c4ff8381..c8ce5ba191 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 = "r33"
+PR = "r34"
# USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf.
# Set PACKAGE_ARCH appropriately.