>>> Patch attached -- it allows parameters to be omitted in action >>> invocations. >> action1 >> ~~~~~~~ >> action2($1,$2,$3,$4) >> >> rules >> ~~~~~ >> action1(one,two,three) >> >> >> I get: "ERROR: Invalid action parameter ($4) >> /etc/shorewall/action.action1" > > If you don't pass a parameter to an action, but refer to the parameter in > the body then you must specify a default value using a DEFAULTS entry. I thought the whole point of your patch was that "it allows parameters to be omitted", so by extension, if $4 doesn't have a value, then the "action2($1,$2,$3,$4)" call should be the equivalent of "action2(one,two,three,)" like it is with any bash variables - if you refer to them and they do not have a value then no value should be assigned/printed. You have a similar arrangement with action variables (IGNOREUNKNOWNVARIABLES), so I don't see how is this any different.
If that cannot be accomplished, then I see little use of your patch to be honest and I may as well revert back to my ?IF ?ELSE ?ENDIF statements I've had before and get it over with. ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ Shorewall-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-devel
