mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-27 21:22:16 +02:00
Eliminate $globals{CONFDIR}
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
e486c16513
commit
7859267539
@ -638,7 +638,6 @@ sub initialize( $;$$) {
|
|||||||
# Misc Globals
|
# Misc Globals
|
||||||
#
|
#
|
||||||
%globals = ( SHAREDIRPL => '' ,
|
%globals = ( SHAREDIRPL => '' ,
|
||||||
CONFDIR => '', # Run-time configuration directory
|
|
||||||
CONFIGDIR => '', # Compile-time configuration directory (location of $product.conf)
|
CONFIGDIR => '', # Compile-time configuration directory (location of $product.conf)
|
||||||
ESTABLISHED_DISPOSITION => 'ACCEPT',
|
ESTABLISHED_DISPOSITION => 'ACCEPT',
|
||||||
LOGPARMS => '',
|
LOGPARMS => '',
|
||||||
@ -1032,14 +1031,12 @@ sub initialize( $;$$) {
|
|||||||
|
|
||||||
if ( $family == F_IPV4 ) {
|
if ( $family == F_IPV4 ) {
|
||||||
$globals{SHAREDIR} = "$shorewallrc{SHAREDIR}/shorewall";
|
$globals{SHAREDIR} = "$shorewallrc{SHAREDIR}/shorewall";
|
||||||
$globals{CONFDIR} = "$shorewallrc{CONFDIR}/shorewall";
|
|
||||||
$globals{PRODUCT} = 'shorewall';
|
$globals{PRODUCT} = 'shorewall';
|
||||||
$config{IPTABLES} = undef;
|
$config{IPTABLES} = undef;
|
||||||
$config{ARPTABLES} = undef;
|
$config{ARPTABLES} = undef;
|
||||||
$validlevels{ULOG} = 'ULOG';
|
$validlevels{ULOG} = 'ULOG';
|
||||||
} else {
|
} else {
|
||||||
$globals{SHAREDIR} = "$shorewallrc{SHAREDIR}/shorewall6";
|
$globals{SHAREDIR} = "$shorewallrc{SHAREDIR}/shorewall6";
|
||||||
$globals{CONFDIR} = "$shorewallrc{CONFDIR}/shorewall6";
|
|
||||||
$globals{PRODUCT} = 'shorewall6';
|
$globals{PRODUCT} = 'shorewall6';
|
||||||
$config{IP6TABLES} = undef;
|
$config{IP6TABLES} = undef;
|
||||||
delete $config{ARPTABLES};
|
delete $config{ARPTABLES};
|
||||||
@ -4295,15 +4292,11 @@ sub ensure_config_path() {
|
|||||||
|
|
||||||
my $f = "$globals{SHAREDIR}/configpath";
|
my $f = "$globals{SHAREDIR}/configpath";
|
||||||
|
|
||||||
$globals{CONFDIR} = "$shorewallrc{SHAREDIR}/$product/configfiles/" if $> != 0;
|
|
||||||
|
|
||||||
unless ( $config{CONFIG_PATH} ) {
|
unless ( $config{CONFIG_PATH} ) {
|
||||||
fatal_error "$f does not exist" unless -f $f;
|
fatal_error "$f does not exist" unless -f $f;
|
||||||
|
|
||||||
open_file $f;
|
open_file $f;
|
||||||
|
|
||||||
add_param( CONFDIR => $globals{CONFDIR} );
|
|
||||||
|
|
||||||
while ( read_a_line( NORMAL_READ ) ) {
|
while ( read_a_line( NORMAL_READ ) ) {
|
||||||
if ( $currentline =~ /^\s*([a-zA-Z]\w*)=(.*?)\s*$/ ) {
|
if ( $currentline =~ /^\s*([a-zA-Z]\w*)=(.*?)\s*$/ ) {
|
||||||
my ($var, $val) = ($1, $2);
|
my ($var, $val) = ($1, $2);
|
||||||
|
@ -891,7 +891,7 @@ sub firewall_zone() {
|
|||||||
# Determine if the passed physical device is a bridge
|
# Determine if the passed physical device is a bridge
|
||||||
#
|
#
|
||||||
sub is_a_bridge( $ ) {
|
sub is_a_bridge( $ ) {
|
||||||
which 'brctl' && qt( "brctl show | tail -n+2 | grep -q '^$_[0]\[\[:space:\]\]'" );
|
qt which 'brctl' && qt( "brctl show | tail -n+2 | grep -q '^$_[0]\[\[:space:\]\]'" );
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user