Sophie

Sophie

distrib > Mandriva > 9.1 > i586 > by-pkgid > 8c6202abd5c23d52fed280e28dc23b0a > files > 32

initscripts-7.06-12.3.91mdk.i586.rpm

#! /bin/bash

# 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/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/init.d/$subsys.init ]; then
		/etc/init.d/$subsys.init stop
	elif [ -f /etc/init.d/$subsys ]; then
		/etc/init.d/$subsys stop
	else
		rm -f "$i"
	fi
done