Remove temporary files/directories on error

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5501 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-03-11 22:45:27 +00:00
parent bbeee2943e
commit d2db1d04a9
2 changed files with 5 additions and 3 deletions

View File

@ -148,6 +148,9 @@ my $line; # Current config file line
my $object; # Object file Handle Reference
my $tempfile; # Temporary object file name
#
# Zone Table.
#
@ -380,6 +383,8 @@ sub warning_message
sub fatal_error
{
print STDERR " ERROR: @_\n";
close $object, if $object;
system "rm -rf $ENV{TMP_DIR}" if $ENV{TMP_DIR};
exit 2;
}
@ -5425,7 +5430,6 @@ sub do_initialize() {
sub compile_firewall( $ ) {
my $objectfile = $_[0];
my $tempfile;
my ( $dir, $file );
( $command, $doing, $done ) = qw/ check Checking Checked / unless $objectfile;

View File

@ -1,5 +1,3 @@
#!/bin/sh
#
# Clear Proxy Arp
#