diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index 13e33c902..d50257bff 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -1805,6 +1805,7 @@ dump_command() { restore_command() { local finished finished=0 + local result while [ $finished -eq 0 -a $# -gt 0 ]; do option=$1 @@ -1869,8 +1870,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