tech-userlevel archive

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

rc.subr: Passing extra arguments to run_rc_command



Hello,

[ Please CC me any replies ]

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.

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?

I'm now in the process of updating the manual page and writing tests
for the new feature.

Thanks!

-- 
Julio Merino

Attachment: rc_subr.diff
Description: Binary data



Home | Main Index | Thread Index | Old Index