Tighten up dependency handling -- Phase II

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6750 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-07-02 19:57:06 +00:00
parent a066fba60f
commit 01e32dee56
2 changed files with 7 additions and 19 deletions

View File

@ -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]
#

View File

@ -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;