Fix LOG_VERBOSE=2 without STARTUP_LOG

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7853 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-12-07 16:32:01 +00:00
parent d1ee636f83
commit 898a20a43a

View File

@ -1792,9 +1792,24 @@ sub get_configuration( $ ) {
check_trivalue ( 'ROUTE_FILTER', '' ); check_trivalue ( 'ROUTE_FILTER', '' );
check_trivalue ( 'LOG_MARTIANS', '' ); check_trivalue ( 'LOG_MARTIANS', '' );
default 'LOG_VERBOSITY' , -1;
default 'STARTUP_LOG' , ''; default 'STARTUP_LOG' , '';
if ( $config{STARTUP_LOG} ne '' ) {
if ( defined $config{LOG_VERBOSITY} ) {
if ( $config{LOG_VERBOSITY} eq '' ) {
$config{LOG_VERBOSITY} = 2;
} else {
my $val = numeric_value1( $config{LOG_VERBOSITY} );
fatal_error "Invalid LOG_VERBOSITY ($config{LOG_VERBOSITY} )" unless defined $val && $val >= -1 && $val <= 2;
$config{STARTUP_LOG} = '' if $config{LOG_VERBOSITY} < 0;
}
} else {
$config{LOG_VERBOSITY} = 2;
}
} else {
$config{LOG_VERBOSITY} = -1;
}
default_yes_no 'ADD_IP_ALIASES' , 'Yes'; default_yes_no 'ADD_IP_ALIASES' , 'Yes';
default_yes_no 'ADD_SNAT_ALIASES' , ''; default_yes_no 'ADD_SNAT_ALIASES' , '';
default_yes_no 'DETECT_DNAT_IPADDRS' , ''; default_yes_no 'DETECT_DNAT_IPADDRS' , '';