summaryrefslogtreecommitdiffstats
path: root/meta/packages/sysvinit/sysvinit/rcS
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/sysvinit/sysvinit/rcS')
-rwxr-xr-xmeta/packages/sysvinit/sysvinit/rcS56
1 files changed, 1 insertions, 55 deletions
diff --git a/meta/packages/sysvinit/sysvinit/rcS b/meta/packages/sysvinit/sysvinit/rcS
index e7a7e617d0..90af4149e4 100755
--- a/meta/packages/sysvinit/sysvinit/rcS
+++ b/meta/packages/sysvinit/sysvinit/rcS
@@ -36,63 +36,9 @@ fi
36trap ":" INT QUIT TSTP 36trap ":" INT QUIT TSTP
37 37
38# 38#
39# Do we have /proc/progress and set VERBOSE to "no" ?
40# If so, calculate the number of scripts and the incremental step
41#
42if [ "$VERBOSE" = no ]; then
43 if [ -e /proc/progress ]; then
44 set `ls -1 /etc/rc$runlevel.d/S* | wc`
45 numscripts=$1
46 PROGRESS_incstep=`expr 90 / $1`
47 PROGRESS_value=10
48 PROGRESS=yes
49 export PROGRESS_value PROGRESS_incstep
50 fi
51fi
52export VERBOSE PROGRESS
53
54#
55# Call all parts in order. 39# Call all parts in order.
56# 40#
57for i in /etc/rcS.d/S??* 41exec /etc/init.d/rc S
58do
59 # Ignore dangling symlinks for now.
60 [ ! -f "$i" ] && continue
61
62 # Handle verbosity
63 [ "$VERBOSE" = very ] && echo "INIT: Running $i..."
64 if [ "$PROGRESS" = yes ]; then
65 export PROGRESS_value=`expr $PROGRESS_value + $PROGRESS_incstep`
66 echo "$PROGRESS_value Starting $i..." >/proc/progress
67 fi
68
69 case "$i" in
70 *.sh)
71 # Source shell script for speed.
72 (
73 trap - INT QUIT TSTP
74 set start
75 . $i
76 )
77 ;;
78 *)
79 # No sh extension, so fork subprocess.
80 $i start
81 ;;
82 esac
83
84 #
85 # Report status based on result code
86 #
87 result=$?
88 if [ "$PROGRESS" = yes ]; then
89 if [ "$result" = 0 ]; then
90 echo "=s" >/proc/progress
91 else
92 echo "=f" >/proc/progress
93 fi
94 fi
95done
96 42
97# 43#
98# For compatibility, run the files in /etc/rc.boot too. 44# For compatibility, run the files in /etc/rc.boot too.