diff options
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-x | rc.shutdown | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/rc.shutdown b/rc.shutdown index c0f9655..4688a6b 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -14,19 +14,19 @@ echo " ]" 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 # Terminate all processes |