On 04/16/2016 06:44 PM, [email protected] wrote: > > > On Sat, Apr 16, 2016, at 06:21 PM, Tom Eastep wrote: >>> IPv4_0=$( /usr/sbin/shorewall-lite call find_first_interface_address_if_any >>> eth0 ) >> The first requires less work from you :-) > > Heh, generally a good thing! > > I did notice that if I do > > IPv4_0=$( /usr/sbin/shorewall-lite call find_first_interface_address > eth0 ) > > in 'init', then I can use > > &{IPv4_0} > > in 'rules', but NOT in 'params'. > > The reason I ask is what if I'd like to set seomthing like, > > MY_HOME_WAN="${IPv4_0}/29" > > Do I need to do that in init too, using shell execs > > IPv4_0=$( /usr/sbin/shorewall-lite call find_first_interface_address > eth0 ) > MY_HOME_WAN="${IPv4_0}/29" > > and then use > > &{MY_HOME_WAN} > > in rules?
Your init script is embedded in the generated firewall script which runs
on the firewall system -- rules are processed on the administrative
system when creating the firewall script.
>
> Or is there a legit way to define
>
> MY_HOME_WAN=...
>
> in 'params', by first grabbing the &{IPv4_0} from 'init'?
No.
>
> I thought 'init' execs at the beginning of shorewall start and would get
> picked up by everything that comes after. I'm looking at the firewall itself
> to try to figure out all the expansion stuff and when it happens.
>
The params file is processed only at compile time.
-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 \________________________________________________
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________ Shorewall-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-users
