Scott Ruckh wrote:> I see this listed in the release notes for shorewall-4.0.10 > > 2) Shorewall-perl now generates a fatal error if a non-existant shell > variable is used in any configuration file (except > /etc/shorewall/params). > > Does the following no longer work? > > Have the following line in shorewall/init > > ETH2_IP=`find_first_interface_address eth2` > > And then use the variable $ETH2_IP in shorewall/rules ? > > I got this error after installing 4.0.10 and issuing ''shorewall restart'': > > Compiling /etc/shorewall/rules... > ERROR: Undefined shell variable ($ETH2_IP) : /etc/shorewall/rules (line 432) > > This is a new error since running 4.0.9 (shorewall PERL).And what you are doing has never worked. -Tom -- Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ teastep@shorewall.net PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It''s the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
I see this listed in the release notes for shorewall-4.0.10 2) Shorewall-perl now generates a fatal error if a non-existant shell variable is used in any configuration file (except /etc/shorewall/params). Does the following no longer work? Have the following line in shorewall/init ETH2_IP=`find_first_interface_address eth2` And then use the variable $ETH2_IP in shorewall/rules ? I got this error after installing 4.0.10 and issuing ''shorewall restart'': Compiling /etc/shorewall/rules... ERROR: Undefined shell variable ($ETH2_IP) : /etc/shorewall/rules (line 432) This is a new error since running 4.0.9 (shorewall PERL). Thanks. -- Scott ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It''s the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Tom Eastep wrote:> > And what you are doing has never worked. >Rather, it has not worked since you migrated to Shorewall-perl. Under Shorewall-perl, variable expansion in configuration files like ''rules'' occurs at compile time. Your ''init'' script is executed at run-time (when the compiled script is run on the target system). -Tom -- Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ teastep@shorewall.net PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It''s the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Scott Ruckh wrote:> That''s nice to know. > > Does putting that same code in shorewall/params make it work, or does it just suppress the error?It works, provided that the state of the variable doesn''t change between the time that the params file is interpreted and when the script runs (which is a few seconds). Users of Shorewall-lite can''t depend on that -- Shorewall users generally can. -Tom -- Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ teastep@shorewall.net PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It''s the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
This is what you said Tom Eastep> Scott Ruckh wrote: >> I see this listed in the release notes for shorewall-4.0.10 >> >> 2) Shorewall-perl now generates a fatal error if a non-existant shell >> variable is used in any configuration file (except >> /etc/shorewall/params). >> >> Does the following no longer work? >> >> Have the following line in shorewall/init >> >> ETH2_IP=`find_first_interface_address eth2` >> >> And then use the variable $ETH2_IP in shorewall/rules ? >> >> I got this error after installing 4.0.10 and issuing ''shorewall restart'': >> >> Compiling /etc/shorewall/rules... >> ERROR: Undefined shell variable ($ETH2_IP) : /etc/shorewall/rules (line 432) >> >> This is a new error since running 4.0.9 (shorewall PERL). > > And what you are doing has never worked. >That''s nice to know. Does putting that same code in shorewall/params make it work, or does it just suppress the error? ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It''s the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace