On 10/11/2015 12:32 AM, Ob Noxious wrote:
> Hi,
> 
> Playing a bit with the INCLUDE (and ?INCLUDE) directive I don't get
> exactly what I wish and from what I see, I think this is not yet possible.
> 
> I would like to make Shorewall configuration highly modular for the
> "rules" part by being able to disable/enable parts of it.
> 
> For example, I have rules that span accross different sections and I
> currently can't include them properly if I'm not mistaken. I have to
> split the rules according to their section and include them individually
> which is far from convenient.
> 
> Would it be possible to extend the functionality of ?INCLUDE (or create
> another directive if it's necessary, that's up to you) in order to have
> real splitted "rules" files?
> 
> rules.foo
> ------8<----- CUT HERE ------>8------
> ?SECTION INVALID
> ... stuff ...
> 
> ?SECTION NEW
> ... stuff ...
> ------8<----- CUT HERE ------>8------
> 
> rules.bar
> ------8<----- CUT HERE ------>8------
> ?SECTION RELATED
> ... stuff ...
> 
> ?SECTION NEW
> ... stuff ...
> ------8<----- CUT HERE ------>8------
> 
> and finaly, "rules"
> ------8<----- CUT HERE ------>8------
> ?INCLUDE rules.foo
> ?INCLUDE rules.bar
> ------8<----- CUT HERE ------>8------
> 
> or
> 
> ------8<----- CUT HERE ------>8------
> ?INCLUDE rules.foo
> 
> ?SECTION NEW
> ... stuff ...
> 
> ?INCLUDE rules.bar
> ------8<----- CUT HERE ------>8------
> 
> and the compiler would happilly merge all those configurations in order
> of appearence. Very convenient to simply disable a configuration without
> trouble.
> 
> What do you think?
> 

I would rather you used ?if...?else...?endif to conditionally
include/exclude features. That's already supported.

-Tom
-- 
Tom Eastep        \ When I die, I want to go like my Grandfather who
Shoreline,         \ died peacefully in his sleep. Not screaming like
Washington, USA     \ all of the passengers in his car
http://shorewall.net \________________________________________________

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to