tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc RC scripts



On Sun, Oct 04, 2009 at 10:02:06AM +0000, Jens Rehsack wrote:
> Joerg Sonnenberger wrote:
> > Hi all,
> > I am consider to make the RC script support in pkgsrc a bit more useful
> > out of the box with the following changes:
> > 
> > (1) Install pkgsrc RC scripts by default into /etc/rc.pkg.d, not
> > /etc/rc.d and adjust the default value for rc_directories accordingly.
> > This keeps the logical separation between base and pkgsrc RC scripts
> > and still allows /usr (or /usr/pkg) to be on a separate filesystem.
> 
> How about /usr/pkg/etc/rc.d (read: ${PREFIX}/etc/rc.d)?
> So it's possible to logical assign the rc.d script to the installed pkg's
> (if someone wants to use more than one PREFIX - e.g. for testing).

Read the end of the second sentence. It is not possible to have the
scripts on a separate filesystem from /etc/rc.d without having to
magically reprocess the rcorder output. That is somewhat nasty as the
order constraints of rcorder are intentionally weak.  The same restraint
would apply for other prefixes, but I don't see a sane default for that,
so they would keep either /etc/rc.d as current default or
${PKG_SYSCONFDIR}/rc.d, but I think the latter would make more sense.

> 
> > (2) Provide a default value of NO for the control variables. This
> > ensures that no stupid "Missing variable $foo" clutters up the boot
> > messages.
> > 
> > Comments?
> 
> An rc.subr package would be great and the scripts should look for it in
> /etc/rc.subr and ${PREFIX}/etc/rc.subr - this increases the portability.

There is pkgtools/rc.subr. If there is interest, it is easy to auto-fix
the rc scripts to use PREFIX/etc/rc.subr and therefore do the right
thing.

Joerg


Home | Main Index | Thread Index | Old Index