From f6081f262419c2a4880d372636e391a52e148782 Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Tue, 7 Jan 2003 01:48:51 +0000 Subject: updated rc.single to shutdown daemons correctly --- rc.single | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'rc.single') diff --git a/rc.single b/rc.single index 71024d9..24837ff 100755 --- a/rc.single +++ b/rc.single @@ -8,19 +8,19 @@ if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then # Shutdown daemons + let i=${#DAEMONS[@]} + while [[ i -gt 0 ]]; do + if [[ `echo ${DAEMONS[$i]} | grep '^[^\!]' | wc -l` -eq 1 ]]; then + /etc/rc.d/${DAEMONS[$i]} stop + fi + let i=i-1 + done + # find any leftover daemons and shut them down if [ -d /var/run/daemons ]; then for daemon in `ls /var/run/daemons`; do /etc/rc.d/$daemon stop done fi - - # Shutdown network - /etc/rc.d/network stop - - # Shutdown pcmcia - if [ "$PCMCIA" = "yes" -a -f /etc/rc.d/pcmcia ]; then - /etc/rc.d/pcmcia stop - fi fi if [ "$PREVLEVEL" != "N" ]; then -- cgit v1.2.3