From 0136dbbea86e042d28f50469efc341ee284217fd Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 30 Jan 2007 17:57:10 +0000 Subject: [PATCH] Fix INCLUDE in params file git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5326 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/changelog.txt | 5 ++++- Shorewall/compiler | 8 +++++--- Shorewall/releasenotes.txt | 4 ++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index b4832ebde..f24b37301 100644 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -6,7 +6,10 @@ Changes in 3.4.0 RC 1 3) Add macro for SixXS. -4) Allow ranges and ipset names in the ADDRESSES column of maclist file. +4) Allow ranges and ipset names in the ADDRESSES column of maclist + file. + +5) Fix INCLUDE in extension scripts and /etc/shorewall/params. Changes in 3.4.0 Beta 3 diff --git a/Shorewall/compiler b/Shorewall/compiler index c0625e50a..65f48acd6 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -100,13 +100,15 @@ progress_message_and_save() # indent() { if [ -n "$INDENT" ]; then - if [ -n "$HAVEAWK" ]; then - eval awk \''BEGIN { indent=1; }; /^\s*$/ { print ""; indent=1; next; }; { if (indent == 1) print "'"$INDENT"'" $0; else print; }; { indent=1; }; /\\$/ { indent=0; };'\' $1 + if [ $# -ge 1 ]; then + read_file $1 0 | eval sed \'s\/^/"$INDENT"\/\' - else eval sed \'s\/^/"$INDENT"\/\' $1 fi + elif [ $# -ge 1 ]; then + read_file $1 0 else - cat $1 + cat fi } diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index 060cfd8f8..f7224d1a7 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -72,6 +72,10 @@ Problems Corrected in 3.4.0 RC1 This problem has been corrected in RC1. +4) Previously, if "INCLUDE " appeared in + /etc/shorewall/params or in an extension script then run-time + errors occured. + Other Changes in 3.4.0 RC 1 1) A macro that handles SixXS has been contributed by Christian