Subject: Re: /etc/rc.shutdown.local
To: None <tech-userlevel@NetBSD.org>
From: None <tlaronde@polynum.com>
List: tech-userlevel
Date: 03/17/2007 15:00:34
On Sat, Mar 17, 2007 at 02:27:39PM +0100, Joerg Sonnenberger wrote:
> On Sat, Mar 17, 2007 at 01:12:54PM +0100, tlaronde@polynum.com wrote:
> > For example for PostgreSQL, I wanted to benefit for such a feature but I
> > wasn't really enthusiastic about placing scripts in /etc/rc.d (I prefer
> > to keep things orthogonal between system and local additions, I mean
> > clearly identifying in the file system hierarchy what is added).
> 
> Placing them in /etc/rc.d is the easiest way, we can easily introduce a
> second directory though. The problem is that the boot processing needs
> to be able to read all scripts, so they have to be installed on /, the
> rest is a number of small changes to read the second directory.

IMHO indeed a second directory would be clean (just to mention use of
CVS and .cvsignore or mtree etc: NetBSD knows what it can deal with and
what is not its stuff because it has a fixed name---a dir). 
And for bulk deployment it would be easy to put
indeed all possible used services scripts in say /etc/rc.d/local and 
have standard service=YES to customize.

The solution with rc.local and rc.shutdown.local does not scale. But for
limited number of nodes it is a solution that exists now, and one find a
lot of NetBSD 'tips' saying to put lines like:

if [ -f /path/to/opt/etc/rc.d/script ]; then
	/path/to/opt/etc/rc.d/script start
fi

so the symetric /etc/rc.shutdown.local should at least be advertised.

Regards,
-- 
Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>
                 http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C