aboutsummaryrefslogtreecommitdiff
path: root/rc.single
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2003-01-07 01:48:51 +0000
committerJudd Vinet <judd@archlinux.org>2003-01-07 01:48:51 +0000
commitf6081f262419c2a4880d372636e391a52e148782 (patch)
treeb678f4602b47e29a7cf44c4e0d4bc447f7ff172a /rc.single
parent6c4a6fc1938f12ee85b4f593de64a8776e5c1ba0 (diff)
downloadinitscripts-f6081f262419c2a4880d372636e391a52e148782.tar.xz
updated rc.single to shutdown daemons correctly
Diffstat (limited to 'rc.single')
-rwxr-xr-xrc.single16
1 files changed, 8 insertions, 8 deletions
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