[Ferm] How to do things without global variables
Marc Haber
mh+ferm at zugschlus.de
Wed Dec 9 11:43:28 CET 2009
Hi,
On Wed, Dec 09, 2009 at 11:39:59AM +0100, Kiss Gabor (Bitman) wrote:
> > if ferm would have global variables, I'd want to write this:
> >
> > (file globalvars)
> > @def $client_networks="";
>
> > (file int104)
> > @def $client_networks=($client_networks 10.1.104.0/24);
>
> > (file int108)
> > @def $client_networks=($client_networks 10.1.108.0/24);
>
> > (file client-networks)
> > saddr $client_networks subchain {
> > (long list of client rules snipped)
> > }
>
> 1. How these files are related each to other and to ferm.conf?
They are all in a ferm.conf.d, and ferm.conf has
@include 'ferm.conf.d/';
Sorry for not mentioning that.
> 2. Man page writes:
> Include files are special - variables declared in an included file are
> still available in the calling block. This is useful when you include a
> file which only declares variables.
I have read that, but that doesn't seem to be true here.
> Do you use @include at all?
Of course.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 3221 2323190
More information about the Ferm
mailing list