[Ferm] How to do things without global variables
Kiss Gabor (Bitman)
kissg at ssg.ki.iif.hu
Wed Dec 9 11:39:59 CET 2009
Hi Marc,
I don't understand exactly what you mean.
> 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?
I cant see any @include directive.
> Sadly, this doesn't work, as the $client_networks variable seems to be
> local to the files and thus the $client_networks interpolated inside
> the client-networks file is empty.
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.
Do you use @include at all?
Regards
Gabor
More information about the Ferm
mailing list