mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 01:37:59 +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 $object; # Object file Handle Reference
|
||||||
|
|
||||||
|
my $tempfile; # Temporary object file name
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Zone Table.
|
# Zone Table.
|
||||||
#
|
#
|
||||||
@ -380,6 +383,8 @@ sub warning_message
|
|||||||
sub fatal_error
|
sub fatal_error
|
||||||
{
|
{
|
||||||
print STDERR " ERROR: @_\n";
|
print STDERR " ERROR: @_\n";
|
||||||
|
close $object, if $object;
|
||||||
|
system "rm -rf $ENV{TMP_DIR}" if $ENV{TMP_DIR};
|
||||||
exit 2;
|
exit 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5425,7 +5430,6 @@ sub do_initialize() {
|
|||||||
sub compile_firewall( $ ) {
|
sub compile_firewall( $ ) {
|
||||||
|
|
||||||
my $objectfile = $_[0];
|
my $objectfile = $_[0];
|
||||||
my $tempfile;
|
|
||||||
my ( $dir, $file );
|
my ( $dir, $file );
|
||||||
|
|
||||||
( $command, $doing, $done ) = qw/ check Checking Checked / unless $objectfile;
|
( $command, $doing, $done ) = qw/ check Checking Checked / unless $objectfile;
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Clear Proxy Arp
|
# Clear Proxy Arp
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user