Date: Thu, 31 Aug 2006 14:43:20 +0200 From: Karol Kwiatkowski <freebsd@orchid.homeunix.org> To: freebsd-questions@freebsd.org Subject: Re: not adding daemons to rc.conf Message-ID: <44F6D968.6020708@orchid.homeunix.org> In-Reply-To: <20060831032554.GA84168@catflap.slightlystrange.org> References: <200608302047.06425.freebsd@dfwlp.com> <20060831032554.GA84168@catflap.slightlystrange.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6CDC1583E44FB6A89F6E5171 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable On 31/08/2006 05:25, Daniel Bye wrote: > On Wed, Aug 30, 2006 at 08:47:06PM -0500, Jonathan Horne wrote: >> ive noticed that apache can be started manually using the apachectl to= ol, even> if it is not enabled in /etc/rc.conf. do many other daemons ha= ve this=20 >> ability? i have a dev server that i would like to not have many thing= s=20 >> enabled in the rc.conf, but i would like an easy way to just start spe= cific=20 >> daemons when i need. >=20 > There is the "force" modifier which may be of help/interest. It works > like this: >=20 > # /usr/local/etc/rc.d/script forcestart >=20 > This will, well, force the script to run, even if it's not explicitly > enabled in /etc/rc.conf. It does more, it will force the script to run even if a daemon is running. What OP is looking for is 'one' prefix: # /usr/local/etc/rc.d/script onestart # /usr/local/etc/rc.d/script onestop After rc.subr(8) manpage: ------ run_rc_command argument [...] 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. ------ HTH, Karol --=20 Karol Kwiatkowski <freebsd at orchid dot homeunix dot org> OpenPGP: http://www.orchid.homeunix.org/carlos/gpg/0x06E09309.asc --------------enig6CDC1583E44FB6A89F6E5171 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE9tlwezeoPAwGIYsRCNanAJ4kpdkT3J/Orf0OhoOJ4CWcUIndGgCfaRbY sogq+d1FWNuRkBRCnC6Z3Lk= =tqqd -----END PGP SIGNATURE----- --------------enig6CDC1583E44FB6A89F6E5171--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44F6D968.6020708>