Move $test to the config module.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2017-03-02 11:42:07 -08:00
parent 9075a6dd7a
commit 876d76b294
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10
5 changed files with 13 additions and 14 deletions

View File

@ -226,9 +226,7 @@ sub process_arprules() {
#
# Generate the arptables_load() function
#
sub create_arptables_load( $ ) {
my $test = shift;
sub create_arptables_load() {
emit ( '#',
'# Create the input to arptables-restore and pass that input to the utility',
'#',

View File

@ -8654,9 +8654,7 @@ sub create_nfobjects() {
#
# Generate the netfilter input
#
sub create_netfilter_load( $ ) {
my $test = shift;
sub create_netfilter_load() {
$mode = NULL_MODE;
emit ( '#',

View File

@ -49,8 +49,6 @@ our $VERSION = 'MODULEVERSION';
our $export;
our $test;
our $family;
our $have_arptables;
@ -363,8 +361,8 @@ sub generate_script_3($) {
progress_message2 "Creating ip6tables-restore input...";
}
create_netfilter_load( $test );
create_arptables_load( $test ) if $have_arptables;
create_netfilter_load;
create_arptables_load if $have_arptables;
create_chainlist_reload( $_[0] );
create_save_ipsets;
create_load_ipsets;
@ -931,7 +929,7 @@ sub compiler {
# S T O P _ F I R E W A L L
# (Writes the stop_firewall() function to the compiled script)
#
compile_stop_firewall( $test, $export , $have_arptables, $update );
compile_stop_firewall( $export , $have_arptables, $update );
#
# U P D O W N
# (Writes the updown() function to the compiled script)
@ -1000,7 +998,7 @@ sub compiler {
initialize_chain_table(0);
if ( $debug ) {
compile_stop_firewall( $test, $export, $have_arptables, $update );
compile_stop_firewall( $export, $have_arptables, $update );
disable_script;
} else {
#

View File

@ -179,6 +179,7 @@ our %EXPORT_TAGS = ( internal => [ qw( create_temp_script
$debug
$file_format
$comment
$test
%config
%origin
@ -244,6 +245,10 @@ Exporter::export_ok_tags('internal');
our $VERSION = 'MODULEVERSION';
#
# Compiling for test - this is initialized in the Compiler module.
#
our $test;
#
# describe the current command, it's present progressive, and it's completion.
#

View File

@ -2500,8 +2500,8 @@ sub setup_mss( ) {
#
# Compile the stop_firewall() function
#
sub compile_stop_firewall( $$$$ ) {
my ( $test, $export, $have_arptables, $convert ) = @_;
sub compile_stop_firewall( $$$ ) {
my ( $export, $have_arptables, $convert ) = @_;
my $input = $filter_table->{INPUT};
my $output = $filter_table->{OUTPUT};