forked from extern/shorewall_code
Remove tempfile on error; change 'use lib' to final form
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5596 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
6f114931bf
commit
792901b42d
@ -94,7 +94,12 @@ sub warning_message
|
||||
sub fatal_error
|
||||
{
|
||||
print STDERR " ERROR: @_\n";
|
||||
close $object, if $object;
|
||||
|
||||
if ( $object ) {
|
||||
close $object;
|
||||
unlink $tempfile;
|
||||
}
|
||||
|
||||
system "rm -rf $ENV{TMP_DIR}" if $ENV{TMP_DIR};
|
||||
die;
|
||||
}
|
||||
|
@ -192,8 +192,6 @@ sub determine_zones()
|
||||
|
||||
fatal_error("Invalid zone file entry: $line") if $extra;
|
||||
|
||||
fatal_error( "Duplicate zone name: $zone\n" ) if $zones{$zone};
|
||||
|
||||
if ( $zone =~ /(\w+):([\w,]+)/ ) {
|
||||
$zone = $1;
|
||||
@parents = split ',', $2;
|
||||
@ -208,6 +206,7 @@ sub determine_zones()
|
||||
|
||||
fatal_error "Invalid zone name: $zone" unless "\L$zone" =~ /^[a-z]\w*$/ && length $zone <= $env{MAXZONENAMELENGTH};
|
||||
fatal_error "Invalid zone name: $zone" if $zone =~ /^all2|2all$/;
|
||||
fatal_error( "Duplicate zone name: $zone\n" ) if $zones{$zone};
|
||||
|
||||
my $zoneref = $zones{$zone} = {};
|
||||
$zoneref->{parents} = \@parents;
|
||||
|
@ -41,7 +41,7 @@
|
||||
# This program performs rudimentary shell variable expansion on action and macro files.
|
||||
|
||||
use strict;
|
||||
use lib '/usr/share/shorewall/Shorewall';
|
||||
use lib '/usr/share/shorewall';
|
||||
use Shorewall::Common;
|
||||
use Shorewall::Config;
|
||||
use Shorewall::Chains;
|
||||
|
Loading…
Reference in New Issue
Block a user