mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-24 00:23:28 +01:00
Train changes -- set 2
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6453 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
6a0887b3b6
commit
d944e3dbd5
@ -1353,7 +1353,17 @@ sub get_interface_nets ( $ ) {
|
||||
#
|
||||
sub expand_rule( $$$$$$$$$$ )
|
||||
{
|
||||
my ($chainref , $restriction, $rule, $source, $dest, $origdest, $target, $loglevel , $disposition, $exceptionrule ) = @_;
|
||||
my ($chainref , # Chain
|
||||
$restriction, # Determines what to do with interface names in the SOURCE or DEST
|
||||
$rule, # Caller's matches that don't depend on the SOURCE, DEST and ORIGINAL DEST
|
||||
$source, # SOURCE
|
||||
$dest, # DEST
|
||||
$origdest, # ORIGINAL DEST
|
||||
$target, # Target ('-j' part of the rule)
|
||||
$loglevel , # Log level (and tag)
|
||||
$disposition, # Primative part of the target (RETURN, ACCEPT, ...)
|
||||
$exceptionrule # Caller's matches used in exclusion case
|
||||
) = @_;
|
||||
my ($iiface, $diface, $inets, $dnets, $iexcl, $dexcl, $onets , $oexcl );
|
||||
my $chain = $chainref->{name};
|
||||
#
|
||||
|
@ -1150,17 +1150,22 @@ sub propagateconfig() {
|
||||
}
|
||||
|
||||
#
|
||||
# Add a shell script file to the output script
|
||||
# Add a shell script file to the output script -- Return true if the
|
||||
# file exists and is not in /usr/share/shorewall/.
|
||||
#
|
||||
sub append_file( $ ) {
|
||||
my $user_exit = find_file $_[0];
|
||||
my $result = 0;
|
||||
|
||||
unless ( $user_exit =~ /$globals{SHAREDIR}/ ) {
|
||||
if ( -f $user_exit ) {
|
||||
$result = 1;
|
||||
save_progress_message "Processing $user_exit ...";
|
||||
copy1 $user_exit;
|
||||
}
|
||||
}
|
||||
|
||||
$result;
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -104,8 +104,7 @@ sub generate_script_1() {
|
||||
for my $exit qw/init start tcclear started stop stopped clear/ {
|
||||
emit "run_${exit}_exit() {";
|
||||
push_indent;
|
||||
append_file $exit;
|
||||
emit 'true';
|
||||
append_file $exit or emit 'true';
|
||||
pop_indent;
|
||||
emit "}\n";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user