On 2/9/13 7:22 PM, "Mr Dash Four" <[email protected]> wrote:
> >>>> 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. Well, it isn't happening in 4.5.13. So if you think it is better to code your ?if?else mess than adding a single "DEFAULTS -,-,-,-" at the beginning of action.action1, then that is certainly your choice. But I know what I would choose to do. -Tom You do not need a parachute to skydive. You only need a parachute to skydive twice. ------------------------------------------------------------------------------ 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
