From thomas@cuivre.fr.eu.org  Tue Jan 20 16:12:38 2009
Return-Path: <thomas@cuivre.fr.eu.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9FE0A106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 20 Jan 2009 16:12:38 +0000 (UTC)
	(envelope-from thomas@cuivre.fr.eu.org)
Received: from melamine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [82.225.155.84])
	by mx1.freebsd.org (Postfix) with ESMTP id 654638FC18
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 20 Jan 2009 16:12:38 +0000 (UTC)
	(envelope-from thomas@cuivre.fr.eu.org)
Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000)
	id 69C065CBF1; Tue, 20 Jan 2009 16:52:37 +0100 (CET)
Message-Id: <20090120155237.69C065CBF1@melamine.cuivre.fr.eu.org>
Date: Tue, 20 Jan 2009 16:52:37 +0100 (CET)
From: Thomas Quinot <thomas@cuivre.fr.eu.org>
Reply-To: Thomas Quinot <thomas@cuivre.fr.eu.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: rc(8) makes undesirable assumptions on local startup scripts
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         130782
>Category:       conf
>Synopsis:       rc(8) makes undesirable assumptions on local startup scripts
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 20 16:20:00 UTC 2009
>Closed-Date:    Wed Jan 21 23:15:26 UTC 2009
>Last-Modified:  Thu Jan 22 13:30:03 UTC 2009
>Originator:     Thomas Quinot
>Release:        FreeBSD 7.1-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD melamine.cuivre.fr.eu.org 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Tue Sep 2 21:01:50 CEST 2008 root@melamine.cuivre.fr.eu.org:/space/build/obj/space/build/src/RELENG_7/sys/GENERIC i386


	
>Description:
Per the rc(8) man page, startup scripts need to support the commands:
start, stop, restart, status, poll, and rcvar.

However /etc/rc actually assumes that all startup scripts also support
at least faststart and quietstart, and this is entirely undocumented.
One cannot reasonably assume that all local startup scripts, including those
for 3rd party software, will rely on run_rc_command, so we should make
sure that scripts supporting only the documented commands are
properly handled.

>How-To-Repeat:
	
>Fix:

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Tue Jan 20 21:13:50 UTC 2009 
Responsible-Changed-Why:  
Over to maintainers 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130782 
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. 

If you have other questions please try the -questions list. 


hope this helps, 

Doug 


Responsible-Changed-From-To: freebsd-rc->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Wed Jan 21 23:13:37 UTC 2009 
Responsible-Changed-Why:  

I closed this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130782 

From: Thomas Quinot <thomas@FreeBSD.ORG>
To: dougb@FreeBSD.org
Cc: freebsd-rc@FreeBSD.org, bug-followup@freebsd.org
Subject: Re: conf/130782: rc(8) makes undesirable assumptions on local
	startup scripts
Date: Thu, 22 Jan 2009 14:05:13 +0100

 * 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.
 
 The problem we had was an inconsistent script that *had* a "# PROVIDES:"
 comment (and so was deemed "new style" by /etc/rc), BUT failed to
 handle faststart & co (or use run_rc_command to handle them
 automatically).
 
 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.
 
 Thomas.
 
>Unformatted:
