forked from extern/shorewall_code
First working Shorewall6
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8961 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
5834b574f2
commit
ecb479b616
@ -2462,6 +2462,7 @@ sub create_netfilter_load() {
|
||||
push_indent;
|
||||
|
||||
my $utility = $family == F_IPV4 ? 'iptables-restore' : 'ip6tables-restore';
|
||||
my $UTILITY = $family == F_IPV4 ? 'IPTABLES_RESTORE' : 'IP6TABLES_RESTORE';
|
||||
|
||||
save_progress_message "Preparing $utility input...";
|
||||
|
||||
@ -2516,7 +2517,7 @@ sub create_netfilter_load() {
|
||||
#
|
||||
emit( 'exec 3>&-',
|
||||
'',
|
||||
'[ -n "$DEBUG" ] && command=debug_restore_input || command=$IPTABLES_RESTORE',
|
||||
'[ -n "$DEBUG" ] && command=debug_restore_input || command=$' . $UTILITY,
|
||||
'',
|
||||
'progress_message2 "Running $command..."',
|
||||
'',
|
||||
|
@ -134,12 +134,22 @@ sub generate_script_1() {
|
||||
|
||||
emit( '[ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir' );
|
||||
|
||||
if ( $export ) {
|
||||
emit ( 'CONFIG_PATH="/etc/shorewall-lite:/usr/share/shorewall-lite"' ,
|
||||
'[ -n "${VARDIR:=/var/lib/shorewall-lite}" ]' );
|
||||
if ( $family == F_IPV4 ) {
|
||||
if ( $export ) {
|
||||
emit ( 'CONFIG_PATH="/etc/shorewall-lite:/usr/share/shorewall-lite"' ,
|
||||
'[ -n "${VARDIR:=/var/lib/shorewall-lite}" ]' );
|
||||
} else {
|
||||
emit ( qq(CONFIG_PATH="$config{CONFIG_PATH}") ,
|
||||
'[ -n "${VARDIR:=/var/lib/shorewall}" ]' );
|
||||
}
|
||||
} else {
|
||||
emit ( qq(CONFIG_PATH="$config{CONFIG_PATH}") ,
|
||||
'[ -n "${VARDIR:=/var/lib/shorewall}" ]' );
|
||||
if ( $export ) {
|
||||
emit ( 'CONFIG_PATH="/etc/shorewall6-lite:/usr/share/shorewall6-lite"' ,
|
||||
'[ -n "${VARDIR:=/var/lib/shorewall6-lite}" ]' );
|
||||
} else {
|
||||
emit ( qq(CONFIG_PATH="$config{CONFIG_PATH}") ,
|
||||
'[ -n "${VARDIR:=/var/lib/shorewall6}" ]' );
|
||||
}
|
||||
}
|
||||
|
||||
emit 'TEMPFILE=';
|
||||
|
@ -2341,7 +2341,7 @@ sub generate_aux_config() {
|
||||
|
||||
my $value = $config{$option};
|
||||
|
||||
emit "[ -n \"\${$option:=$value}\" ]" if $value ne '';
|
||||
emit "[ -n \"\${$option:=$value}\" ]" if defined $value && $value ne '';
|
||||
}
|
||||
|
||||
sub conditionally_add_option1( $ ) {
|
||||
|
Loading…
Reference in New Issue
Block a user