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:
teastep 2007-05-20 16:25:53 +00:00
parent a4e66531a9
commit 363a4e9016
2 changed files with 25 additions and 2 deletions

View File

@ -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
#

View File

@ -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";