#!/bin/sh

# Bring down all unneeded services that are still running (there shouldn't 
# be any, so this is just a sanity check)

for i in /var/lock/*; do
	# Check if the script is there.
	[ ! -f $i ] && continue

	# Get the subsystem name.
	sys=${i#/var/lock/}

	# Bring the subsystem down.
	if [ -f /etc/rc.d/init.d/$sys.init ]; then
	    /etc/rc.d/init.d/$sys.init stop
	else
	    /etc/rc.d/init.d/$sys stop
	fi
done

