aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/killall
diff options
context:
space:
mode:
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
+