summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorThorsten Glaser <tg@mirbsd.org>2014-05-03 21:43:05 +0000
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-04 01:21:46 +0200
commit3d4286b8898ad2b528baf3ac75a09bd42804cd56 (patch)
tree8fe742403f25ecebf174c28682ee2bbdc0a6b2d3 /package
parentd74318f9694b7b852fc3189fff3866408fc0ccd0 (diff)
verbose (by default, deactivatable) init scripts
Diffstat (limited to 'package')
-rwxr-xr-xpackage/base-files/src/etc/init.d/rcK11
-rwxr-xr-xpackage/base-files/src/etc/init.d/rcS11
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 ''