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 5:53 PM, Julio Merino <> 
> 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.

On a second thought, passing such arguments to pre/post is not a good
idea.  If we want to error out when unsupported parameters are given
but pre/post would like to use them anyway, implementing the
validation would be tricky.  (It'd mean going Alan's route of
postfixing the command names, with, e.g. *, but IMHO, that's overkill
for what I'm trying to achieve.)

Please take another look at the updated patch.  (I'm not including the
tests I wrote as they add too much clutter to the patch and most
people just don't care.)


Julio Merino

Attachment: rc_subr.diff
Description: Binary data

Home | Main Index | Thread Index | Old Index