Use of rcorder for local rc.d/*.sh scripts

Brooks Davis brooks at one-eyed-alien.net
Mon Jun 6 23:54:27 GMT 2005


On Mon, Jun 06, 2005 at 03:12:07PM -0700, Doug Barton wrote:
> J.R. Oldroyd wrote:
> >I posted this to -current yesterday; it was suggested I resend to
> >this list.
> 
> Thanks for bringing this up, and yes, we prefer discussion here on rc.d 
> topics.
> 
> >----- Forwarded message from "J.R. Oldroyd" <fbsd at opal.com> -----
> >
> >From: "J.R. Oldroyd" <fbsd at opal.com>
> >Date: Thu, 2 Jun 2005 17:10:23 -0400
> >Subject: Use of rcorder for local rc.d/*.sh scripts
> >To: freebsd-current at freebsd.org
> >
> >Is there a reason that rcorder is not used in /etc/rc.d/localpkg
> >so that the scripts there can be ordered using their tags?
> >
> >If not, could we make the following change to /etc/rc.d/localpkg:
> >
> >--- localpkg.orig	Fri Oct  8 13:52:43 2004
> >+++ localpkg	Thu Jun  2 16:53:56 2005
> >@@ -36,7 +36,7 @@
> > 		done
> > 		script_save_sep="$IFS"
> > 		IFS="${script_name_sep}"
> >-		for script in ${slist}; do
> >+		for script in `rcorder -s nostart ${slist} 2>/dev/null`; do
> 
> This is an interesting approach. I'm in favor of incorporating rcorder for 
> local scripts (whether ports, or homegrown stuff), but I think I prefer an 
> approach that brings all the scripts into the fray, so that local scripts 
> that need to execute before parts of the base can do so. Have you put any 
> thought into such an approach?

This isn't feasable in the general case with current infrastructure.
The problem is that you need to make it up to mountcritremote before you
have any assurance that /usr/local/etc exists.

Ports contains a work around that allows port to install script in
/etc/rc.d if they truly need to appear before localpkg.  Such ports
generally still need to have scripts that run after mountcritlocal and
won't work on systems where /usr/local is remote unless it is on /.

From the perspective of someone who works on the diskless scripts, I
think that sorting scripts in localpkg and using this hack is a decent
comprimise.

Another note, this decision will need to be discussed with ports@ since
there are a lot of scripts in ${LOCALBASE}/rc.d.  There's also at least
one binary (postfix).  I'd like to see this change happen, but there are
a lot of issues to work out.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20050606/3731b182/attachment.bin


More information about the freebsd-rc mailing list