Andrew Suffield wrote:
> On Fri, Oct 26, 2007 at 11:11:53AM -0700, Tom Eastep wrote:
>> I'll have to think about this proposal. I don't believe that I can just
>> suddenly de-implement Macros in Shorewall-perl so I would need to add the
>> 'function' capability in an upwardly-compatible way.
> 
> It should be fairly simple to accomplish that - but I really haven't
> thought about the problem for any longer than it took to write that
> mail, it's just a sketch of one possible approach. The basic goal is
> straightforward: there's no good reason for the limitations of the
> macro system, and tossing a Turing-complete language in there pretty
> much eliminates them with a minimum of effort.
> 
> I'd be happy with anything that I can (ab)use to implement:
> 
> foreach i in x,y,z: ACCEPT fw $i tcp ssh

How about something so simple as:

SHELL for z in x y z; do echo ACCEPT fw $z tcp ssh; done

Line continuation can be used for more complex scripts.

And it took me less that 1/2 hour to get that working :-) And it's available
in any file.

-Tom
-- 
Tom Eastep    \ Nothing is foolproof to a sufficiently talented fool
Shoreline,     \ http://shorewall.net
Washington USA  \ [EMAIL PROTECTED]
PGP Public Key   \ https://lists.shorewall.net/teastep.pgp.key

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to