Date: Wed, 13 Aug 2008 12:27:30 +0200 From: Jonathan McKeown <jonathan+freebsd-hackers@hst.org.za> To: freebsd-hackers@freebsd.org Subject: Re: If not the force, what should I use? Message-ID: <200808131227.30125.jonathan%2Bfreebsd-hackers@hst.org.za> In-Reply-To: <48A29E15.5080303@unsane.co.uk> References: <78cb3d3f0808120810o54f49373n69ac5076c9a9c9b7@mail.gmail.com> <200808130813.56656.jonathan%2Bfreebsd-hackers@hst.org.za> <48A29E15.5080303@unsane.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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 th= at > > - 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. =46rom 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=3DYES. force Skip the checks for rcvar being set to ``YES'', and sets rc_force=3DYES. 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= =20 service before enabling it in rc.conf. I also use it with NFS. Whenever I've changed /etc/exports, I force mountd = to=20 reread it by issuing /etc/rc.d/mountd onereload Jonathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808131227.30125.jonathan%2Bfreebsd-hackers>