aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/killall
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1997-09-16 14:12:05 +0000
committerErik Troan <ewt@redhat.com>1997-09-16 14:12:05 +0000
commitced9dffda28f1ec2b060f3e419cf3c6b964b03a1 (patch)
treeda3f56c24861ddc77e2910291c71adc12dca136b /rc.d/init.d/killall
downloadinitscripts-ced9dffda28f1ec2b060f3e419cf3c6b964b03a1.tar
initscripts-ced9dffda28f1ec2b060f3e419cf3c6b964b03a1.tar.gz
initscripts-ced9dffda28f1ec2b060f3e419cf3c6b964b03a1.tar.bz2
initscripts-ced9dffda28f1ec2b060f3e419cf3c6b964b03a1.tar.xz
initscripts-ced9dffda28f1ec2b060f3e419cf3c6b964b03a1.zip
Initial revision
Diffstat (limited to 'rc.d/init.d/killall')
-rwxr-xr-xrc.d/init.d/killall20
1 files changed, 20 insertions, 0 deletions
diff --git a/rc.d/init.d/killall b/rc.d/init.d/killall
new file mode 100755
index 00000000..8ccfa683
--- /dev/null
+++ b/rc.d/init.d/killall
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# Bring down all unneded services that are still running (there shouldn't
+# be any, so this is just a sanity check)
+
+for i in /var/lock/subsys/*; do
+ # Check if the script is there.
+ [ ! -f $i ] && continue
+
+ # Get the subsystem name.
+ subsys=${i#/var/lock/subsys/}
+
+ # Bring the subsystem down.
+ if [ -f /etc/rc.d/init.d/$subsys.init ]; then
+ /etc/rc.d/init.d/$subsys.init stop
+ else
+ /etc/rc.d/init.d/$subsys stop
+ fi
+done
+