Date: Wed, 13 Aug 2008 11:42:36 +0100 From: Vincent Hoffman <vince@unsane.co.uk> To: Jonathan McKeown <jonathan+freebsd-hackers@hst.org.za> Cc: freebsd-hackers@freebsd.org Subject: Re: If not the force, what should I use? Message-ID: <48A2BA9C.6050804@unsane.co.uk> In-Reply-To: <200808131227.30125.jonathan%2Bfreebsd-hackers@hst.org.za> References: <78cb3d3f0808120810o54f49373n69ac5076c9a9c9b7@mail.gmail.com> <200808130813.56656.jonathan%2Bfreebsd-hackers@hst.org.za> <48A29E15.5080303@unsane.co.uk> <200808131227.30125.jonathan%2Bfreebsd-hackers@hst.org.za>
next in thread | previous in thread | raw e-mail | index | archive | help
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" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48A2BA9C.6050804>
