conf/130782: rc(8) makes undesirable assumptions on local startup scripts

Doug Barton dougb at FreeBSD.org
Fri Jan 23 00:15:54 PST 2009


Thomas Quinot wrote:
> * dougb at 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


More information about the freebsd-rc mailing list