diff options
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-x | rc.shutdown | 6 |
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 |