diff options
Diffstat (limited to 'packages/sysvinit')
-rw-r--r-- | packages/sysvinit/sysvinit/rcS | 49 | ||||
-rw-r--r-- | packages/sysvinit/sysvinit_2.86.bb | 2 |
2 files changed, 31 insertions, 20 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 # diff --git a/packages/sysvinit/sysvinit_2.86.bb b/packages/sysvinit/sysvinit_2.86.bb index 12b16eda56..f58a7243e0 100644 --- a/packages/sysvinit/sysvinit_2.86.bb +++ b/packages/sysvinit/sysvinit_2.86.bb @@ -3,7 +3,7 @@ SECTION = "base" LICENSE = "GPL" MAINTAINER = "Chris Larson <kergoth@handhelds.org>" HOMEPAGE = "http://freshmeat.net/projects/sysvinit/" -PR = "r7" +PR = "r8" # USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf. # Set PACKAGE_ARCH appropriately. |