passing options thru '/etc/rc.d/foo start'
m.seaman at infracaninophile.co.uk
Thu Sep 17 08:44:09 UTC 2009
Tom Worster wrote:
> On 9/16/09 3:19 PM, "Matthew Seaman" <m.seaman at infracaninophile.co.uk>
>> 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 command
>> arguments by setting foo_flags="-a -b -c". This is a convention, and
>> services may use several more specific variables to build a command line
>> 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=no' without touching a config file?
>> In this case, setting sshd_flags will work as sshd uses the default rc
>> start function.
> hi matthew,
> i tried this and couldn't make it work before i emailed my question. then
> mel answered that the /etc/rc.d/foo scripts ignore environment. and then,
> looking closer at man pages, i got the impression that perhaps only /etc/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/rc.conf
*wasn't* a config file and then I pretty much forgot to add 'in /etc/rc.conf'
at the crucial point in what I wrote.
I don't think your request is possible without editing at least one file
Dr Matthew J Seaman MA, D.Phil. Flat 3
7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW, UK
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 259 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090917/bc13a518/signature.pgp
More information about the freebsd-questions