aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sysvinit/sysvinit
diff options
context:
space:
mode:
authorMichael Lauer <mickey@vanille-media.de>2005-01-29 13:06:24 +0000
committerMichael Lauer <mickey@vanille-media.de>2005-01-29 13:06:24 +0000
commit808c5e0d8ddc44ef3c19a77bb5ca573240df16c2 (patch)
treec322441e843dd758add0cbcf28163ec94c041cec /packages/sysvinit/sysvinit
parentcd3ce02b660415053c816ef5bd63b7b16c77ade8 (diff)
downloadopenembedded-808c5e0d8ddc44ef3c19a77bb5ca573240df16c2.tar.gz
Merge bk://oe-devel@oe-devel.bkbits.net/openembedded
into allanon.vanille.de:/local/pkg/oe/packages 2005/01/29 14:05:55+01:00 vanille.de!mickeyl sysinit: indicate success/failure based on return code during rcS (w/ELPP) BKrev: 41fb8a50qim7ia4zthJaQ5ReHFVTLA
Diffstat (limited to 'packages/sysvinit/sysvinit')
-rw-r--r--packages/sysvinit/sysvinit/rcS49
1 files changed, 30 insertions, 19 deletions
diff --git a/packages/sysvinit/sysvinit/rcS b/packages/sysvinit/sysvinit/rcS
index c011b0d4f4..e9426a7803 100644
--- a/packages/sysvinit/sysvinit/rcS
+++ b/packages/sysvinit/sysvinit/rcS
@@ -32,24 +32,23 @@ fi
trap ":" INT QUIT TSTP
#
-# Do we have /proc/progress and want to have a progress display?
-# If so, calculate the number of scripts and the increasing step
-#
-if [ "$VERBOSE" = progress ]; then
- mount /proc
- if [ ! -e /proc/progress ]; then
- echo "INIT: VERBOSE=progress requested, but /proc/progress not available."
- echo "INIT: Falling back to VERBOSE=no"
- VERBOSE=no
- else
- set `ls -1 /etc/rc$runlevel.d/S* | wc`
- numscripts=$1
- PROGRESS_incstep=`expr 70 / $1`
- PROGRESS_value=30
- export PROGRESS_value PROGRESS_incstep
- fi
+# Do we have /proc/progress and want to have a progress display?
+# If so, calculate the number of scripts and the incremental step
+#
+if [ "$VERBOSE" = no ]; then
+ mount /proc
+ if [ ! -e /proc/progress ]; then
+ echo "INIT: VERBOSE=no requested, but /proc/progress not available."
+ else
+ set `ls -1 /etc/rc$runlevel.d/S* | wc`
+ numscripts=$1
+ PROGRESS_incstep=`expr 90 / $1`
+ PROGRESS_value=10
+ PROGRESS=yes
+ export PROGRESS_value PROGRESS_incstep
+ fi
fi
-export VERBOSE
+export VERBOSE PROGRESS
#
# Call all parts in order.
@@ -61,11 +60,11 @@ do
# Handle verbosity
[ "$VERBOSE" = very ] && echo "INIT: Running $i..."
- if [ "$VERBOSE" = progress ]; then
+ if [ "$PROGRESS" = yes ]; then
export PROGRESS_value=`expr $PROGRESS_value + $PROGRESS_incstep`
echo "$PROGRESS_value Starting $i..." >/proc/progress
fi
-
+
case "$i" in
*.sh)
# Source shell script for speed.
@@ -80,6 +79,18 @@ do
$i start
;;
esac
+
+ #
+ # Report status based on result code
+ #
+ result=$?
+ if [ "$PROGRESS" = yes ]; then
+ if [ "$result" = 0 ]; then
+ echo "=s" >/proc/progress
+ else
+ echo "=f" >/proc/progress
+ fi
+ fi
done
#