Date: Thu, 17 Sep 2009 09:43:50 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Tom Worster <fsb@thefsb.org> Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: passing options thru '/etc/rc.d/foo start' Message-ID: <4AB1F6C6.3020000@infracaninophile.co.uk> In-Reply-To: <C6D6C66B.127F5%fsb@thefsb.org> References: <C6D6C66B.127F5%fsb@thefsb.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2E12B39DEB8BEF3D0B0F554B Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Tom Worster wrote: > On 9/16/09 3:19 PM, "Matthew Seaman" <m.seaman@infracaninophile.co.uk> > wrote: >=20 >> Tom Worster wrote: >>> is there a general shell syntax that can be used to pass arguments to= a >>> daemon that you're starting with the /etc/rc.d/foo start command? >> If you're starting service foo, then you should be able to define comm= and >> arguments by setting foo_flags=3D"-a -b -c". This is a convention, an= d >> particular >> services may use several more specific variables to build a command li= ne >> or may simply ignore any flags variable completely, so you'll have to = check >> each case individually. >> >>> for example, how does one start sshd using /etc/rc.d/sshd and pass it= >>> '-o X11Forwarding=3Dno' without touching a config file? >> In this case, setting sshd_flags will work as sshd uses the default rc= >> start function. >=20 > hi matthew, >=20 > i tried this and couldn't make it work before i emailed my question. th= en > mel answered that the /etc/rc.d/foo scripts ignore environment. and the= n, > looking closer at man pages, i got the impression that perhaps only /et= c/rc > uses the foo_flags variables when it invokes /etc/rc.d/foo scripts. Uh, yeah. My tortured mental processes had somehow concluded that /etc/r= c.conf *wasn't* a config file and then I pretty much forgot to add 'in /etc/rc.c= onf' at the crucial point in what I wrote. I don't think your request is possible without editing at least one file under /etc Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. Flat 3 7 Priory Courtyard PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW, UK --------------enig2E12B39DEB8BEF3D0B0F554B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkqx9soACgkQ3jDkPpsZ+VZlxACgp1megPaOdLT6mHUus7U6gGuK sCkAn0sVrcwH/Uqnukg/5oKZatDzbX2c =Fqti -----END PGP SIGNATURE----- --------------enig2E12B39DEB8BEF3D0B0F554B--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AB1F6C6.3020000>