From 47419bee3f166f20e038a9c5409a4e4c10cdb9b3 Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 26 Jun 2007 22:49:16 +0000 Subject: [PATCH] Allow Shorewall-perl to be installed before Shorewall git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6684 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Config.pm | 9 ++++++++- Shorewall-perl/buildports.pl | 5 ++++- Shorewall-perl/shorewall-perl.spec | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Shorewall-perl/Shorewall/Config.pm b/Shorewall-perl/Shorewall/Config.pm index 58689a754..e65f2d249 100644 --- a/Shorewall-perl/Shorewall/Config.pm +++ b/Shorewall-perl/Shorewall/Config.pm @@ -64,7 +64,7 @@ our @EXPORT = qw( %globals %capabilities ); -our @EXPORT_OK = qw( $shorewall_dir initialize read_a_line1 ); +our @EXPORT_OK = qw( $shorewall_dir initialize read_a_line1 set_config_path ); our $VERSION = 1.00; # @@ -346,6 +346,13 @@ sub set_shorewall_dir( $ ) { $shorewall_dir = shift; } +# +# Set $globals{CONFIG_PATH} +# +sub set_config_path( $ ) { + $config{CONFIG_PATH} = shift; +} + # # Set $debug # diff --git a/Shorewall-perl/buildports.pl b/Shorewall-perl/buildports.pl index 958e6efb4..8cc3298f3 100755 --- a/Shorewall-perl/buildports.pl +++ b/Shorewall-perl/buildports.pl @@ -34,7 +34,8 @@ use Shorewall::Config qw( open_file fatal_error %globals ensure_config_path - set_shorewall_dir ); + set_shorewall_dir + set_config_path ); our $offset = "\t\t "; @@ -65,6 +66,8 @@ sub print_service( $$ ) { } } +set_config_path( '/etc/shorewall:/usr/share/shorewall' ); + set_shorewall_dir($ARGV[0] || '/etc'); ensure_config_path; diff --git a/Shorewall-perl/shorewall-perl.spec b/Shorewall-perl/shorewall-perl.spec index d982bd77f..a7c1abe6d 100644 --- a/Shorewall-perl/shorewall-perl.spec +++ b/Shorewall-perl/shorewall-perl.spec @@ -15,7 +15,7 @@ Source: %{name}-%{version}.tgz URL: http://www.shorewall.net/ BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-root -Requires: perl shorewall +Requires: perl Provides: shorewall_compiler %description