summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2007-10-21 11:31:45 +0200
committerThomas Bächler <thomas@archlinux.org>2007-10-21 11:31:45 +0200
commitaffd2bf9f3f84d507ab4c4a9998b4d1c2697300c (patch)
treeab6e0f4eeaa9d67ede5931950aed04eec2d6588b
parent1b8636ed76e4bf5ef23c3b357e991c66e18714c5 (diff)
Make daemon shutdown fix more consistent with the other init scripts and simplify it a bit
-rwxr-xr-xrc.shutdown6
1 files changed, 3 insertions, 3 deletions
diff --git a/rc.shutdown b/rc.shutdown
index 12b8f17..19cb00f 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -25,9 +25,9 @@ fi
if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
# Shutdown daemons
let i=${#DAEMONS[@]}
- while [[ i -ge 0 ]]; do
- if [[ $(echo ${DAEMONS[$i]} | grep '^[^\!]' | wc -l) -eq 1 ]]; then
- [ -f /var/run/daemons/${DAEMONS[$i]#@} ] && /etc/rc.d/${DAEMONS[$i]#@} stop
+ while [ $i -ge 0 ]; do
+ if [ "${DAEMONS[$i]:0:1}" != '!' ]; then
+ ck_daemon ${DAEMONS[$i]#@} || /etc/rc.d/${DAEMONS[$i]#@} stop
fi
let i=i-1
done