tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rc.subr: Passing extra arguments to run_rc_command

On Fri, Mar 12, 2010 at 05:53:42PM +0000, Julio Merino wrote:
> Hello,
> [ Please CC me any replies ]
[But not me, Bernd]

> The run_rc_command function from rc.subr(8) only allows giving it a
> command name, and this command name cannot take any extra arguments.
> While writing an rc.d script for monotone, which provides a few
> non-standard commands, I felt the need to pass extra arguments to my
> custom commands.  To do so, I had to mess around with the original
> argv, which is obviously not a nice approach.

If you would give some example why that is needed.

> Therefore, I'd like to modify run_rc_command to take a set of optional
> extra arguments that will later be fed to the _precmd, _cmd and
> _postcmd functions.  See the attached patch.
> Any objections or comments?

That won't help you for the current supported NetBSD releases which do not
support such a feature if this is going into the tree.

As written above it would help to see a specific example why you need it.
IMHO it would be better to leave it like it is now.


Home | Main Index | Thread Index | Old Index