forked from extern/shorewall_code
Avoid infinite loop if fatal_error is called when the command is 'restore'; remove hacks from trying to workaround exit status prob
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5750 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
fd9be10455
commit
25056dc4fb
@ -80,8 +80,6 @@ my $indent = '';
|
||||
my ( $dir, $file ); # Object's Directory and File
|
||||
my $tempfile; # Temporary File Name
|
||||
|
||||
my $exitstatus = 0;
|
||||
|
||||
#
|
||||
# Fatal Error
|
||||
#
|
||||
@ -89,8 +87,6 @@ sub fatal_error
|
||||
{
|
||||
print STDERR " ERROR: @_\n";
|
||||
|
||||
$exitstatus = 1;
|
||||
|
||||
exit 1;
|
||||
}
|
||||
|
||||
@ -343,6 +339,8 @@ END {
|
||||
unlink $tempfile;
|
||||
}
|
||||
|
||||
my $exitstatus = $?; #Get's changed by system()
|
||||
|
||||
system "rm -rf $ENV{TMP_DIR}" if $ENV{TMP_DIR};
|
||||
|
||||
$? = $exitstatus;
|
||||
|
@ -237,9 +237,9 @@ sub warning_message
|
||||
|
||||
sub fatal_error {
|
||||
if ( $currentfile ) {
|
||||
Shorewall::Common::fatal_error "@_ : $currentfilename#$currentlinenumber";
|
||||
print STDERR " ERROR: @_ : $currentfilename#$currentlinenumber\n";
|
||||
} else {
|
||||
Shorewall::Common::fatal_error @_;
|
||||
print STDERR " ERROR: @_\n";
|
||||
}
|
||||
|
||||
exit 1;
|
||||
|
@ -211,7 +211,7 @@ stop_firewall() {
|
||||
}
|
||||
|
||||
case $COMMAND in
|
||||
stop|clear)
|
||||
stop|clear|restore)
|
||||
;;
|
||||
*)
|
||||
set +x
|
||||
|
Loading…
Reference in New Issue
Block a user