From affd2bf9f3f84d507ab4c4a9998b4d1c2697300c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?= Date: Sun, 21 Oct 2007 11:31:45 +0200 Subject: Make daemon shutdown fix more consistent with the other init scripts and simplify it a bit --- rc.shutdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rc.shutdown') 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 -- cgit v1.2.3