From 01e32dee5612b90a90f93f37f0392c4264ba7a5f Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 2 Jul 2007 19:57:06 +0000 Subject: [PATCH] Tighten up dependency handling -- Phase II git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6750 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-common/lib.base | 2 +- Shorewall-perl/Shorewall/Compiler.pm | 24 ++++++------------------ 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/Shorewall-common/lib.base b/Shorewall-common/lib.base index 35a6da92d..5dfcd2b1c 100644 --- a/Shorewall-common/lib.base +++ b/Shorewall-common/lib.base @@ -1,6 +1,6 @@ #!/bin/sh # -# Shorewall 3.4 -- /usr/share/shorewall/lib.base +# Shorewall 4.0 -- /usr/share/shorewall/lib.base # # This program is under GPL [http://www.gnu.org/copyleft/gpl.htm] # diff --git a/Shorewall-perl/Shorewall/Compiler.pm b/Shorewall-perl/Shorewall/Compiler.pm index 6a14e88e8..a4ed682ed 100644 --- a/Shorewall-perl/Shorewall/Compiler.pm +++ b/Shorewall-perl/Shorewall/Compiler.pm @@ -122,30 +122,18 @@ sub generate_script_1() { } emitj ( 'initialize()', - '{' + '{', + ' #', + ' # These variables are required by the library functions called in this script', + ' #' ); push_indent; if ( $export ) { - emitj ( '#', - '# These variables are required by the library functions called in this script', - '#', - 'CONFIG_PATH="/etc/shorewall-lite:/usr/share/shorewall-lite"' ); + emit ( 'CONFIG_PATH="/etc/shorewall-lite:/usr/share/shorewall-lite"' ); } else { - emitj ( 'if [ ! -f ${SHAREDIR}/version ]; then', - ' fatal_error "This script requires Shorewall which do not appear to be installed on this system (did you forget \"-e\" when you compiled?)"', - 'fi', - '', - 'local version=$(cat ${SHAREDIR}/version)', - '', - 'if [ ${SHOREWALL_LIBVERSION:-0} -lt 30403 ]; then', - ' fatal_error "This script requires Shorewall version 3.4.3 or later; current version is $version"', - 'fi', - '#', - '# These variables are required by the library functions called in this script', - '#', - qq(CONFIG_PATH="$config{CONFIG_PATH}") ); + emit ( qq(CONFIG_PATH="$config{CONFIG_PATH}") ); } propagateconfig;