From owner-freebsd-rc@FreeBSD.ORG Thu Apr 15 21:30:28 2010 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 456B5106564A for ; Thu, 15 Apr 2010 21:30:28 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx23.fluidhosting.com [204.14.89.6]) by mx1.freebsd.org (Postfix) with ESMTP id E65C78FC08 for ; Thu, 15 Apr 2010 21:30:27 +0000 (UTC) Received: (qmail 27885 invoked by uid 399); 15 Apr 2010 21:30:26 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 15 Apr 2010 21:30:26 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BC78571.4000808@FreeBSD.org> Date: Thu, 15 Apr 2010 14:30:25 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100330 Thunderbird/3.0.4 MIME-Version: 1.0 To: Matthew Seaman References: <4BC62E4C.2060700@bsdforen.de> <4BC6CE12.7020305@infracaninophile.co.uk> In-Reply-To: <4BC6CE12.7020305@infracaninophile.co.uk> X-Enigmail-Version: 1.0.1 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org Subject: Re: Trivial PR, fix shutdown of rc services started with onestart (fwd) X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 21:30:28 -0000 On 04/15/10 01:28, Matthew Seaman wrote: > On 14/04/2010 22:06:20, Dominic Fandrey wrote: >> I'm running with variations of this for more than a year and not once >> have I been able to detect unwanted side effects. >> However, I can assure you it has spared me a lot of problems. > > There were some rc scrips in /etc/rc.d that always did the 'start' > action no matter what argument they were called with. This change will only matter if there is an actual process that is running. For things in the base there is an _enable default in /etc/defaults/rc.conf for each item. If the user did 'onestart' or 'forcestart' to start the process/service even though _enable is NO, this change will allow it to be shut down cleanly. > I think all of > those have been fixed to recognize a 'stop' argument now, but whether > this also applies to a 'onestop' I can't tell. As someone else already answered, the 'one' or 'force' prepends are converted to internal flags for rc.subr, the argument passed to the script does not contain them. > /etc/rc.d/tmp is an > example -- notice that the script action isn't encapsulated as a > tmp_start function. That's a bug that should be fixed, but it's orthogonal to this issue. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/