rc.d scripts with multiple arguments

Brooks Davis brooks at one-eyed-alien.net
Wed Jan 26 08:32:32 PST 2005


On Wed, Jan 26, 2005 at 03:46:48PM +0100, Tobias Roth wrote:
> Hi
> 
> I have an rc.d/ scripts in the works that would benefit from a second
> argument, eg /etc/rc.d/myscript start foobar
> 
> As it looks, this is not possible with the current mechanism of
> run_rc_command(). So my questions:
> 
> 1) is there already a corrct way to do this?
> 2) would it make sense of not using run_rc_command() and doing the
>    argument handling in the script itself, therefore allowing multiple
>    arguments? or would this be a stupid idea and against the design of
>    rcng?
> 
> I can live without this, but if it's somehow possible, it would be nice.
> Also, if this would theoretically make sense, but rcng doesn't allow it
> yet, I might have go at improving rcng in this direction.

Take a look at /etc/rc.d/netif for a script that does this.  You do have
to do the stop and start bits yourself in this case.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20050126/7093ff0f/attachment.bin


More information about the freebsd-rc mailing list