Make missing capabilties file error messages friendlier

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6091 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-04-23 20:44:24 +00:00
parent 593828a24a
commit 92a4483f88

View File

@ -64,6 +64,7 @@ our %globals = ( SHAREDIR => '/usr/share/shorewall' ,
CONFDIR => '/etc/shorewall',
SHAREDIRPL => '/usr/share/shorewall-perl/',
LOGPARMS => '',
TC_SCRIPT => '',
VERSION => '3.9.4',
);
@ -778,8 +779,10 @@ sub get_configuration( $ ) {
unless ( open_file 'capabilities' ) {
determine_capabilities;
}
} else {
} elsif ( $export ) {
fatal_error "The -e flag requires a capabilities file" unless open_file 'capabilities';
} else {
fatal_error "Compiling under an ordinary user id requires a capabilities file" unless open_file 'capabilities';
}
$globals{ORIGINAL_POLICY_MATCH} = $capabilities{POLICY_MATCH};
@ -910,8 +913,6 @@ sub get_configuration( $ ) {
$config{TCP_FLAGS_DISPOSITION} = 'DROP';
}
$globals{TC_SCRIPT} = '';
default 'TC_ENABLED' , 'Internal';
if ( $val = "\L$config{TC_ENABLED}" ) {