#!/bin/sh
#
# $Id: rc,v 4.1 1993/03/23 16:16:53 mike Exp $
#
# Configure the services available at a given run level according to
# the scripts in the /etc/rc?.d directory.

scriptdir=/etc/rc$1.d

if [ -d $scriptdir ]; then
	# Perform any shutdowns necessary.
	for i in $scriptdir/K*
	do
		if [ -s $i ]; then
			/bin/sh $i stop
		fi
	done

	# Perform startups required for this run level.
	for i in $scriptdir/S*
	do
		if [ -s $i ]; then
			/bin/sh $i start
		fi
	done
fi 
