From 494956938319cfc7ced645c396ba3728fa8156b1 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 2 Dec 2016 09:32:00 -0800 Subject: [PATCH] Correct 'restore' exit status Signed-off-by: Tom Eastep --- Shorewall-core/lib.cli | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index 83d895753..b0b220dfa 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -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