3 # rcS Call all S??* scripts in /etc/rcS.d in
4 # numerical/alphabetical order.
6 # Version: @(#)/etc/init.d/rcS 2.76 19-Apr-1999 miquels@cistron.nl
9 PATH=/sbin:/bin:/usr/sbin:/usr/bin
13 export PATH runlevel prevlevel
15 # Make sure proc is mounted
17 [ -d "/proc/1" ] || mount /proc
20 # See if system needs to be setup. This is ONLY meant to
21 # be used for the initial setup after a fresh installation!
23 if [ -x /sbin/unconfigured.sh ]
34 # Trap CTRL-C &c only in this shell so we can interrupt subprocesses.
36 trap ":" INT QUIT TSTP
39 # Do we have /proc/progress and set VERBOSE to "no" ?
40 # If so, calculate the number of scripts and the incremental step
42 if [ "$VERBOSE" = no ]; then
43 if [ -e /proc/progress ]; then
44 set `ls -1 /etc/rc$runlevel.d/S* | wc`
46 PROGRESS_incstep=`expr 90 / $1`
49 export PROGRESS_value PROGRESS_incstep
52 export VERBOSE PROGRESS
55 # Call all parts in order.
57 for i in /etc/rcS.d/S??*
59 # Ignore dangling symlinks for now.
60 [ ! -f "$i" ] && continue
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
71 # Source shell script for speed.
79 # No sh extension, so fork subprocess.
85 # Report status based on result code
88 if [ "$PROGRESS" = yes ]; then
89 if [ "$result" = 0 ]; then
90 echo "=s" >/proc/progress
92 echo "=f" >/proc/progress
98 # For compatibility, run the files in /etc/rc.boot too.
100 [ -d /etc/rc.boot ] && run-parts /etc/rc.boot
103 # Finish setup if needed. The comment above about
104 # /sbin/unconfigured.sh applies here as well!
106 if [ -x /sbin/setup.sh ]