From c8b8316e08231ad6bc86b6d03435d633a0d1b16f Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 2 Jul 2007 21:32:48 +0000 Subject: [PATCH] Tighten up dependency handling -- Phase III git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6752 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-common/lib.config | 2 ++ Shorewall-perl/Shorewall/Config.pm | 10 ++++++---- Shorewall-shell/compiler | 10 +++++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Shorewall-common/lib.config b/Shorewall-common/lib.config index 730a4509d..607f5302b 100644 --- a/Shorewall-common/lib.config +++ b/Shorewall-common/lib.config @@ -25,6 +25,8 @@ # /usr/share/shorewall/compiler and /usr/share/shorewall/firewall # +SHOREWALL_CONFIGVERSION=40000 + # # Replace commas with spaces and echo the result # diff --git a/Shorewall-perl/Shorewall/Config.pm b/Shorewall-perl/Shorewall/Config.pm index c90520786..fce19812a 100644 --- a/Shorewall-perl/Shorewall/Config.pm +++ b/Shorewall-perl/Shorewall/Config.pm @@ -129,8 +129,6 @@ sub initialize() { TC_SCRIPT => '', VERSION => '4.0.0-RC1', CAPVERSION => 30405 , - MIN_COMMON_VERSION => 40000 , - MIN_COMMON_VERSION_PRINTABLE => '4.0.0', ); # # From shorewall.conf file @@ -177,7 +175,9 @@ sub initialize() { DROP_DEFAULT => undef, REJECT_DEFAULT => undef, ACCEPT_DEFAULT => undef, - QUEUE_DEFAULT => undef, + QUEUE_DEFAULT => undef, MIN_COMMON_VERSION => 40000 , + MIN_COMMON_VERSION_PRINTABLE => '4.0.0', + # # RSH/RCP Commands # @@ -217,7 +217,9 @@ sub initialize() { USE_ACTIONS=> undef, OPTIMIZE => undef, EXPORTPARAMS => undef, - SHOREWALL_COMPILER => undef, + SHOREWALL_COMPILER => undef, MIN_COMMON_VERSION => 40000 , + MIN_COMMON_VERSION_PRINTABLE => '4.0.0', + # # Packet Disposition # diff --git a/Shorewall-shell/compiler b/Shorewall-shell/compiler index 029e97bfb..319170c4c 100755 --- a/Shorewall-shell/compiler +++ b/Shorewall-shell/compiler @@ -35,8 +35,11 @@ # SHOREWALL_DIR A directory name was passed to /sbin/shorewall # VERBOSE Standard Shorewall verbosity control. -COMMON_VERSION=40000 -COMMON_VERSION_PRINTABLE=4.0.0 +BASE_VERSION=40000 +BASE_VERSION_PRINTABLE=4.0.0 +CONFIG_VERSION=40000 +CONFIG_VERSION_PRINTABLE=4.0.0 + # # Fatal error -- stops the compiler after issuing the error message @@ -5741,7 +5744,8 @@ done VERSION=$(cat $SHELLSHAREDIR/version) -[ $SHOREWALL_LIBVERSION -ne $COMMON_VERSION ] || fatal_error "Shorewall-shell $VERSION requires Shorewall-common $MIN_COMMON_VERSION_PRINTABLE" +[ "$SHOREWALL_LIBVERSION" -eq $BASE_VERSION ] || fatal_error "Shorewall-shell $VERSION requires Shorewall-common lib.base version $BASE_VERSION_PRINTABLE" +[ "$SHOREWALL_CONFIGVERSION" -eq $CONFIG_VERSION ] || fatal_error "Shorewall-shell $VERSION requires Shorewall-common lib.config version $CONFIG_VERSION_PRINTABLE" PROGRAM=compiler