#!/bin/sh
# 
# killall        Script for system downing
#
# description:   kill em all
#
# $Id: killall 5934 2005-05-09 11:51:12Z baggins $
# Bring down all unneeded services that are still running (there shouldn't 
# be any, so this is just a sanity check)

case "$1" in
  start*)
        exit 0
        ;;
  stop*)
	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
	;;
esac

# This must be last line !
# vi:syntax=sh:tw=78:ts=8:sw=4
