Subject: Re: HEADS UP: RCD_SCRIPTS_EXAMPLEDIR changed to share/examples/rc.d
To: None <tech-pkg@netbsd.org>
From: Julio M. Merino Vidal <jmmv@menta.net>
List: tech-pkg
Date: 12/28/2004 22:23:54
[ Top-posting since I'm not replying to this exact mail. ]

Another way could be to tweak the default rc.d scripts (the ones included
in NetBSD) to also look inside, say, /etc/rc.local.d for local scripts.
Then, make pkgsrc use that directory (instead of /etc/rc.d), and change
the default to copy the rc.d scripts in it.  (I'm using this new rc.local.d
to avoid "polluting" a base-system directory by default.)

Plus we'd also generate a share/examples/rc.d/defaults.conf file on the
fly, copying it to /etc/rc.local.d/defaults.conf (or something similar)
and making the default scripts read it (that is, adding three lines to
/etc/rc.conf).  Generating such file is not that difficult... some grep
logic should be enough.  And it could be like a nice "central" database
of all rc variables that can be set to manage installed packages.

Old systems, such as NetBSD 1.6, wouldn't break because they'd know nothing
about /etc/rc.local.d (and it'd be trivial to modify them to be aware of
this).

I don't know if this solution is good or not, but I'm sure we can find
one that works fine as a default and covers almost all needs.

Cheers


On Tue, 28 Dec 2004 12:21:21 -0800 (PST)
"Jeremy C. Reed" <reed@reedmedia.net> wrote:

> On Wed, 29 Dec 2004, Robert Elz wrote:
> 
> > It is possible for rc.conf to get read just once, and not once per
> > script (depending upon how things are configured), in which case the
> > setting in the script would override the setting in rc.conf - which is
> > not exactly what is wanted.
> 
> Another possibility is to add rc.conf.d/ files for packages that need
> them. But this may add more complexity, because the used /etc/rc.conf.d/
> is outside also.
> 
> > The automated way doesn't - you simply tell pkgsrc (in mk.conf) to
> > install the rc.d scripts for you (and if you don't like the default
> > location, where to install them), once, and forever after it does what
> > you want (all but editing rc.conf for you).
> 
> I think it can be done by defining it as an environment variable too for
> later pkg_add installs.
> 
>  Jeremy C. Reed
> 
>  	  	 	 technical support & remote administration
> 	  	 	 http://www.pugetsoundtechnology.com/
> 


-- 
Julio M. Merino Vidal <jmmv@menta.net>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/