Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jan 2009 23:49:39 -0800
From:      Doug Barton <dougb@FreeBSD.org>
To:        Thomas Quinot <thomas@FreeBSD.ORG>
Cc:        freebsd-rc@FreeBSD.org
Subject:   Re: conf/130782: rc(8) makes undesirable assumptions on local	startup scripts
Message-ID:  <49797693.70102@FreeBSD.org>
In-Reply-To: <20090122130513.GA70426@melamine.cuivre.fr.eu.org>
References:  <200901212315.n0LNFPOZ099152@freefall.freebsd.org> <20090122130513.GA70426@melamine.cuivre.fr.eu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Thomas Quinot wrote:
> * dougb@FreeBSD.org, 2009-01-22 :
> 
>> State-Changed-From-To: open->closed
>> State-Changed-By: dougb
>> State-Changed-When: Wed Jan 21 23:13:37 UTC 2009
>> State-Changed-Why: 
>>
>> I think that you misunderstand what fast* and quiet* do.
>> Short version is that they are handled internally by rc.d
>> so that the script itself needs no knowledge of them.
> 
> Doug,
> 
> At first I was a bit surprised by your response, since the behaviour we
> had observed here clearly isn't consistent with your description, so I
> investigated a bit further, and I think I now understand what is going
> on.
> 
> Startup scripts actually *do* need to handle fast* and quiet* themselves
> *if* they are recognized by /etc/rc as "new style" scripts; everything
> is indeed handled transparently by /etc/rc.d/local for local scripts
> that are *not* "new style" scripts.

I've read that sentence several times now, and I'm pretty sure at
least one of us is confused. :)

> The problem we had was an inconsistent script that *had* a "# PROVIDES:"
> comment (and so was deemed "new style" by /etc/rc),

Actually it's a routine in rc.subr that handles this, but basically, yes.

> BUT failed to
> handle faststart & co (or use run_rc_command to handle them
> automatically).

Well that just doesn't make sense. :) When I chose what to look for in
a script to determine "new" vs. "old" I thought PROVIDE was a logical
choice since it will be close to the top (and this is the key bit),
and I couldn't see any reason why an old style script would include
that line.

> So, in the end I agree that the system scripts' behaviour is just fine
> (contrary to what I initially reported), but I still think we should
> clarify our documentation regarding the distinction between "new" and
> "old" startup scripts.

If you have suggestions on where and how to do that I'll be glad to
take a look.


Doug

-- 

    This .signature sanitized for your protection



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49797693.70102>