From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 13 10:42:40 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEB78106566C for ; Wed, 13 Aug 2008 10:42:40 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from unsane.co.uk (unsane-pt.tunnel.tserv5.lon1.ipv6.he.net [IPv6:2001:470:1f08:110::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4E33A8FC16 for ; Wed, 13 Aug 2008 10:42:40 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from vhoffman-macbook.lon.namesco.net (150.117-84-212.staticip.namesco.net [212.84.117.150]) (authenticated bits=0) by unsane.co.uk (8.14.0/8.14.0) with ESMTP id m7DAge0t014965 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 13 Aug 2008 11:42:41 +0100 (BST) (envelope-from vince@unsane.co.uk) Message-ID: <48A2BA9C.6050804@unsane.co.uk> Date: Wed, 13 Aug 2008 11:42:36 +0100 From: Vincent Hoffman User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Jonathan McKeown References: <78cb3d3f0808120810o54f49373n69ac5076c9a9c9b7@mail.gmail.com> <200808130813.56656.jonathan+freebsd-hackers@hst.org.za> <48A29E15.5080303@unsane.co.uk> <200808131227.30125.jonathan+freebsd-hackers@hst.org.za> In-Reply-To: <200808131227.30125.jonathan+freebsd-hackers@hst.org.za> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: If not the force, what should I use? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2008 10:42:41 -0000 Jonathan McKeown wrote: > On Wednesday 13 August 2008 10:40:53 Vincent Hoffman wrote: > >> Jonathan McKeown wrote: >> >> >>> People keep talking about forcestart. >>> >>> Unless I'm misunderstanding things horribly, forcestart does exactly that >>> - forces the service to start regardless of any error that may occur. >>> >>> The better option for starting something as a one-off (not enabled in >>> rc.conf) is mnemonically named onestart - which only ignores the rcvar >>> but still fails on any other error. >>> >>> And yes, I like having onestart/onestop distinguished from start/stop. >>> >> I believe it "forces" a start even though its not actually enabled (in >> rc.conf) rather than regardless of errors. >> If you really want a command line of onestart/onestop install the >> sysutils/bsdadminscripts port which has a script called rconestart and >> rconestop which do exactly that ;) >> > > No, you don't need to install anything - it's part of rc.subr. > > From the rc.subr(8) manpage: > > argument may have one of the following prefixes which alters its > operation: > > fast Skip the check for an existing running process, and > sets rc_fast=YES. > > force Skip the checks for rcvar being set to ``YES'', and > sets rc_force=YES. This ignores argument_precmd > returning non-zero, and ignores any of the required_* > tests failing, and always returns a zero exit status. > > one Skip the checks for rcvar being set to ``YES'', but > performs all the other prerequisite tests. > > I certainly use onestart - generally when I'm configuring and testing a new > service before enabling it in rc.conf. > > I also use it with NFS. Whenever I've changed /etc/exports, I force mountd to > reread it by issuing > > /etc/rc.d/mountd onereload > > Doh I just skimmed though /etc/rc.subr not the manpage, thanks for the pointers. Vince > Jonathan > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >