mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-19 17:28:35 +02:00
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:
parent
bbeee2943e
commit
d2db1d04a9
@ -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;
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Clear Proxy Arp
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user