Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 0c0774ac2c413cef3a2dc2d0db236961 > files > 25

initscripts-9.30.1-1.fc15.i686.rpm

#! /bin/bash

# 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)
	;;
   *)
	echo $"Usage: $0 {start}"
	exit 1
	;;
esac
				      

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/}
	
	# Networking could be needed for NFS root.
	[ $subsys = network ] && continue

	# Bring the subsystem down.
	if [ -f /etc/init.d/$subsys ]; then
		/etc/init.d/$subsys stop
	elif [ -f /etc/init.d/$subsys.init ]; then
		/etc/init.d/$subsys.init stop
	else
		rm -f "$i"
	fi
done
exit 0