mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-15 19:01:19 +01:00
Fix last change fiasco
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6422 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
a4e66531a9
commit
363a4e9016
@ -53,6 +53,7 @@ our @EXPORT = qw(
|
||||
propagateconfig
|
||||
append_file
|
||||
run_user_exit
|
||||
run_user_exit1
|
||||
generate_aux_config
|
||||
|
||||
%config
|
||||
@ -1179,6 +1180,28 @@ sub run_user_exit( $ ) {
|
||||
}
|
||||
}
|
||||
|
||||
sub run_user_exit1( $ ) {
|
||||
my $file = find_file $_[0];
|
||||
|
||||
if ( -f $file ) {
|
||||
progress_message "Processing $file...";
|
||||
#
|
||||
# File may be empty -- in which case eval would fail
|
||||
#
|
||||
push_open $file;
|
||||
|
||||
if ( read_a_line ) {
|
||||
close_file;
|
||||
|
||||
unless (my $return = eval `cat $file` ) {
|
||||
fatal_error "Couldn't parse $file: $@" if $@;
|
||||
fatal_error "Couldn't do $file: $!" unless defined $return;
|
||||
fatal_error "Couldn't run $file";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Generate the aux config file for Shorewall Lite
|
||||
#
|
||||
|
@ -513,7 +513,7 @@ sub add_common_rules() {
|
||||
new_standard_chain output_chain( $interface );
|
||||
}
|
||||
|
||||
run_user_exit 'initdone';
|
||||
run_user_exit1 'initdone';
|
||||
|
||||
setup_blacklist;
|
||||
|
||||
@ -777,7 +777,7 @@ sub setup_mac_lists( $ ) {
|
||||
'done' );
|
||||
}
|
||||
|
||||
run_user_exit 'maclog';
|
||||
run_user_exit1 'maclog';
|
||||
|
||||
log_rule_limit $level, $chainref , $chain , $disposition, '', '', 'add', '' if $level ne '';
|
||||
add_rule $chainref, "-j $target";
|
||||
|
Loading…
Reference in New Issue
Block a user