Subject: Re: proposal on /etc/rc rework
To: None <tech-userlevel@NetBSD.ORG,>
From: Hubert Feyrer <Hubert.Feyrer@rz.uni-regensburg.de>
List: tech-userlevel
Date: 10/01/1996 13:45:47
> I like the rc.d/* as links to init.d/* approach; sometimes you need a
> way to turn off a package without deleting it entirely.

Also, if you want to restart/turn on/off a certain service, you just look for
it in /etc/init.d, one doesn't have to know in what /etc/rc*.d it is.


> Here's a skeleton for a minimal way to do the automatic dependancy
> ordering..
>
> for pkg in /sbin/rc.d/*
> do
> 	${pkg} startdeps
> done | tsort | while read pkg
> do
> 	/sbin/rc.d/${pkg} start
> done
>
> and /sbin/rc.d/named has (oversimplified):
>
> ...
> case $1 in
> deps)
> 	# "net before named"
> 	echo net named
> 	;;
> start)
> 	/usr/sbin/named
> 	;;
> stop)
> 	kill $(cat /var/run/named.pid)
> 	;;
> esac

Sounds cool.


Hubert

-- 
=============== Hubert Feyrer ============================================
      Weekdays: Rennerstr. 19, D-93053 Regensburg, Tel. 0941/943-1333
      Weekends: Bachstr. 40,   D-84066 Mallersdorf, Tel. 08772/6084
      Internet: hubert.feyrer@rz.uni-regensburg.de, IRC: hubertf
==========================================================================