diff options
Diffstat (limited to 'package/base-files/src/etc/init.d')
-rwxr-xr-x | package/base-files/src/etc/init.d/rcK | 11 | ||||
-rwxr-xr-x | package/base-files/src/etc/init.d/rcS | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/package/base-files/src/etc/init.d/rcK b/package/base-files/src/etc/init.d/rcK index 938882ae5..9859f300a 100755 --- a/package/base-files/src/etc/init.d/rcK +++ b/package/base-files/src/etc/init.d/rcK @@ -1,9 +1,20 @@ #!/bin/sh export PATH=/bin:/sbin:/usr/bin:/usr/sbin +: ${rcquiet=0} { grep '^#INIT ' /etc/init.d/* | \ sort -rnk2 | \ while read line; do + test x"$rcquiet" = x"0" && echo -n "Stopping ${line%%:*}... " sh ${line%%:*} autostop + rc=$? + case $rcquiet:$rc in + (0:0) + echo done. + ;; + (0:*) + echo "failed ($rc)." + ;; + esac done } | logger -s -p 6 -t '' diff --git a/package/base-files/src/etc/init.d/rcS b/package/base-files/src/etc/init.d/rcS index e27bc9eb5..77137e6d3 100755 --- a/package/base-files/src/etc/init.d/rcS +++ b/package/base-files/src/etc/init.d/rcS @@ -6,10 +6,21 @@ fi ln -s /proc/self/fd/2 /dev/stderr echo "System initialization ..." export PATH=/bin:/sbin:/usr/bin:/usr/sbin +: ${rcquiet=0} { grep '^#INIT ' /etc/init.d/* | \ sort -nk2 | \ while read line; do + test x"$rcquiet" = x"0" && echo -n "Starting ${line%%:*}... " sh ${line%%:*} autostart + rc=$? + case $rcquiet:$rc in + (0:0) + echo done. + ;; + (0:*) + echo "failed ($rc)." + ;; + esac done } |tee /dev/stderr |logger -p 6 -t '' |