Correct 'restore' exit status

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-12-02 09:32:00 -08:00
parent a1981823f4
commit 4949569383
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -1809,6 +1809,7 @@ dump_command() {
restore_command() {
local finished
finished=0
local result
while [ $finished -eq 0 -a $# -gt 0 ]; do
option=$1
@ -1873,8 +1874,11 @@ restore_command() {
progress_message3 "Restoring $g_product..."
run_it $g_restorepath restore && progress_message3 "$g_product restored from ${VARDIR}/$RESTOREFILE"
result=$?
[ -n "$g_nolock" ] || mutex_off
exit $result
else
echo "File $g_restorepath: file not found"
[ -n "$g_nolock" ] || mutex_off