Subject: Re: What about startup scripts??
To: Al B. Snell <alaric@alaric-snell.com>
From: Tim Rightnour <root@garbled.net>
List: tech-pkg
Date: 12/31/2000 09:03:03
On 31-Dec-00 Al B. Snell wrote:
>> The package maintainer sets "HAS_RC_SCRIPT=somethingd" in the
>> package's "Makefile", (after creating the script, of course). [The
>> name of the script is the name of the daemon is the name of the
>> variable, but you can't necessarily infer it from the name of the
>> package, therefore HAS_RC_SCRIPT is set to the name of the script, and
>> not to "yes".] The package machinery installs the script to
>> /usr/${PREFIX}/etc/rc.d at install time, and adds it to the PLIST.
>> Also at install time, and again at pkg_add time (via "INSTALL"),
>> /etc/rc.{,pkg.}conf gets "somethingd=NO" if it doesn't contain
>> ^somethingd= already, and the user is given some standard direction
>> (via "MESSAGE").
>
> That sounds good to me. Does anyone have any objections?
>
Ohh.. Me..
First.. IMHO.. I should only have to edit my startup configuration in *one*
place, and that place should be /etc/rc.conf. Anything you are adding should
be appended to /etc/defaults/rc.conf.
But the problem with this is, now.. when I upgrade my machine.. BOOM.. all my
defaults go away.
I think the only right way to do this, is during the release cycle.. and this
means:
1) breaking out rcorder to run in two stages, stage 1, pre-usr, stage 2
post-usr.
2) Installing all the rc scripts in ${PREFIX}/etc/rc.d
3) installing all the defaults in ${PREFIX}/etc/defaults/rc.conf
4) Change the standard defaults/rc.conf to read in the pkg ones (obviously on a
conditional if they exist, so the pre-usr-mounted situation doesn't lose)
I'm not completely happy with 4 myself.. but it's a thought..
---
Tim Rightnour <root@garbled.net>
NetBSD: Free multi-architecture OS http://www.netbsd.org/
NetBSD supported hardware database: http://mail-index.netbsd.org/cgi-bin/hw.cgi