mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-14 19:54:06 +01:00
More operation fixes
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8962 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
ecb479b616
commit
7377eb1993
@ -120,16 +120,30 @@ sub generate_script_1() {
|
|||||||
|
|
||||||
push_indent;
|
push_indent;
|
||||||
|
|
||||||
if ( $export ) {
|
if ( $family == F_IPV4 ) {
|
||||||
emit ( 'SHAREDIR=/usr/share/shorewall-lite',
|
if ( $export ) {
|
||||||
'CONFDIR=/etc/shorewall-lite',
|
emit ( 'SHAREDIR=/usr/share/shorewall-lite',
|
||||||
'PRODUCT="Shorewall Lite"'
|
'CONFDIR=/etc/shorewall-lite',
|
||||||
);
|
'PRODUCT="Shorewall Lite"'
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
emit ( 'SHAREDIR=/usr/share/shorewall',
|
||||||
|
'CONFDIR=/etc/shorewall',
|
||||||
|
'PRODUCT=\'Shorewall\'',
|
||||||
|
);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
emit ( 'SHAREDIR=/usr/share/shorewall',
|
if ( $export ) {
|
||||||
'CONFDIR=/etc/shorewall',
|
emit ( 'SHAREDIR=/usr/share/shorewall6-lite',
|
||||||
'PRODUCT=\'Shorewall\'',
|
'CONFDIR=/etc/shorewall6-lite',
|
||||||
);
|
'PRODUCT="Shorewall6 Lite"'
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
emit ( 'SHAREDIR=/usr/share/shorewall6',
|
||||||
|
'CONFDIR=/etc/shorewall6',
|
||||||
|
'PRODUCT=\'Shorewall6\'',
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
emit( '[ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir' );
|
emit( '[ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir' );
|
||||||
|
@ -406,6 +406,9 @@ sub initialize( $ ) {
|
|||||||
BLACKLIST_DISPOSITION => undef,
|
BLACKLIST_DISPOSITION => undef,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
$globals{SHAREDIR} = '/usr/share/shorewall';
|
||||||
|
$globals{CONFDIR} = '/etc/shorewall6';
|
||||||
|
|
||||||
%config =
|
%config =
|
||||||
( STARTUP_ENABLED => undef,
|
( STARTUP_ENABLED => undef,
|
||||||
VERBOSITY => undef,
|
VERBOSITY => undef,
|
||||||
@ -1811,7 +1814,7 @@ sub ensure_config_path() {
|
|||||||
|
|
||||||
my $f = "$globals{SHAREDIR}/configpath";
|
my $f = "$globals{SHAREDIR}/configpath";
|
||||||
|
|
||||||
$globals{CONFDIR} = "/usr/share/$product/configfiles/";
|
$globals{CONFDIR} = "/usr/share/$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;
|
||||||
|
Loading…
Reference in New Issue
Block a user