forked from extern/shorewall_code
Final (FLW) fix for exit status
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5749 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
62285033c9
commit
fd9be10455
@ -80,6 +80,8 @@ my $indent = '';
|
|||||||
my ( $dir, $file ); # Object's Directory and File
|
my ( $dir, $file ); # Object's Directory and File
|
||||||
my $tempfile; # Temporary File Name
|
my $tempfile; # Temporary File Name
|
||||||
|
|
||||||
|
my $exitstatus = 0;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Fatal Error
|
# Fatal Error
|
||||||
#
|
#
|
||||||
@ -87,12 +89,7 @@ sub fatal_error
|
|||||||
{
|
{
|
||||||
print STDERR " ERROR: @_\n";
|
print STDERR " ERROR: @_\n";
|
||||||
|
|
||||||
if ( $object ) {
|
$exitstatus = 1;
|
||||||
close $object;
|
|
||||||
unlink $tempfile;
|
|
||||||
}
|
|
||||||
|
|
||||||
system "rm -rf $ENV{TMP_DIR}" if $ENV{TMP_DIR};
|
|
||||||
|
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
@ -340,4 +337,15 @@ 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};
|
||||||
|
|
||||||
|
$? = $exitstatus;
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user