From 567b2f37f98c00efe22823fccd25480c522a511f Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 8 Feb 2007 16:51:40 +0000 Subject: [PATCH] Back out params change git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5374 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/compiler | 2 ++ Shorewall/lib.base | 15 +++++++++++++++ Shorewall/lib.config | 17 ----------------- Shorewall/releasenotes.txt | 26 ++++++-------------------- 4 files changed, 23 insertions(+), 37 deletions(-) diff --git a/Shorewall/compiler b/Shorewall/compiler index 157c2bc92..d70db613b 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -5092,6 +5092,8 @@ __EOF__ __EOF__ fi + append_file params + cat >&3 << __EOF__ STOPPING= diff --git a/Shorewall/lib.base b/Shorewall/lib.base index 61e6ba69d..bed2dd23d 100644 --- a/Shorewall/lib.base +++ b/Shorewall/lib.base @@ -909,6 +909,21 @@ resolve_file() # $1 = file name esac } +# +# Perform variable substitution on the passed argument and echo the result +# +expand() # $@ = contents of variable which may be the name of another variable +{ + eval echo \"$@\" +} + +# +# Function for including one file into another +# +INCLUDE() { + . $(find_file $(expand $@)) +} + # # Set the Shorewall state # diff --git a/Shorewall/lib.config b/Shorewall/lib.config index 6b1d7d7d1..e3604ab11 100644 --- a/Shorewall/lib.config +++ b/Shorewall/lib.config @@ -171,14 +171,6 @@ list_count() { list_count1 $(separate_list $1) } -# -# Perform variable substitution on the passed argument and echo the result -# -expand() # $@ = contents of variable which may be the name of another variable -{ - eval echo \"$@\" -} - # # Filter that expands variables # @@ -1604,13 +1596,6 @@ read_file() # $1 = file name, $2 = nest count fi } -# -# Function for including one file into another -# -INCLUDE() { - . $(find_file $(expand $@)) -} - # # Strip comments and blank lines from a file and place the result in the # temporary directory @@ -1874,8 +1859,6 @@ do_initialize() { run_user_exit params - [ "$PROGRAM" = compiler ] && run_user_exit compile - config=$(find_file shorewall.conf) if [ -f $config ]; then diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index 0660b8270..1e4e0ea1d 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -34,28 +34,14 @@ Problems Corrected in 3.4.0 RC2 automatically loaded by Shorewall. They have now been added to the /usr/share/shorewall[-lite]/modules files. +2) If "INCLUDE " appeared in /etc/shorewall/params then + run-time errors occurred. This has been corrected. Note that if you + use INCLUDE in your params file in an export directory then the + included file must also be available on the firewall system in + /etc/shorewall-lite/. + Other Changes in 3.4.0 RC 1 -1) In spite of my claim that I would not introduce any changes other - than bug fixes in a release candidate, I'm going to do so anyway. - - Beginning with Shorewall 3.4.0 RC2, Shorewall will only process - /etc/shorewall/params during the compile phase. Any shell variables - needed at run-time by your extension scripts must be set in - /etc/shorewall/init. - - In a Shorewall/Shorewall Lite environment, this allows - /etc/shorewall/params to be written to run exclusively - on the administrative system while /etc/shorewall/init runs - exclusively on the firewall system. - - So shell variables required at compile time may be set in - /etc/shorewall/params and those required at run-time may be set in - /etc/shorewall/init. - - As part of this change, extra white space is no longer removed from - /etc/shorewall/params as it was in RC1. - Migration Considerations: If you are migrating from a Shorewall version earlier than 3.2.0 then