Add END block

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5629 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-03-22 18:46:19 +00:00
parent e505c2ef85
commit 16846f2f34
2 changed files with 10 additions and 8 deletions

View File

@ -1256,7 +1256,7 @@ sub create_netfilter_load() {
if ( $slowstart ) { if ( $slowstart ) {
emit 'TEMPFILE=$(mktempfile)'; emit 'TEMPFILE=$(mktempfile)';
emit ''; emit '';
emit 'exec 3>>$OUTPUT'; emit 'exec 3>>$TEMPFILE';
} else { } else {
emit 'iptables-restore << __EOF__'; emit 'iptables-restore << __EOF__';
$state = CAT_STATE; $state = CAT_STATE;

View File

@ -94,13 +94,6 @@ sub warning_message
sub fatal_error sub fatal_error
{ {
print STDERR " ERROR: @_\n"; print STDERR " ERROR: @_\n";
if ( $object ) {
close $object;
unlink $tempfile;
}
system "rm -rf $ENV{TMP_DIR}" if $ENV{TMP_DIR};
die; die;
} }
@ -283,4 +276,13 @@ sub finalize_aux_config() {
progress_message3 "Shorewall configuration compiled to $file"; progress_message3 "Shorewall configuration compiled to $file";
} }
END {
if ( $object ) {
close $object;
unlink $tempfile;
}
system "rm -rf $ENV{TMP_DIR}" if $ENV{TMP_DIR};
}
1; 1;