From 8e362f28d02ae84efab5d2f0432584ad86d36853 Mon Sep 17 00:00:00 2001 From: Anton Todorov Date: Wed, 30 Dec 2015 10:46:39 +0200 Subject: [PATCH] fix ssh_make_path function Check against exec rc from the ssh session. (cherry picked from commit a548468fff31d95c51399685c758d4832dd8b6e2) --- src/mad/sh/scripts_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mad/sh/scripts_common.sh b/src/mad/sh/scripts_common.sh index 023fe63a1d..d62877c57c 100644 --- a/src/mad/sh/scripts_common.sh +++ b/src/mad/sh/scripts_common.sh @@ -453,7 +453,7 @@ fi EOF` SSH_EXEC_RC=$? - if [ $? -ne 0 ]; then + if [ $SSH_EXEC_RC -ne 0 ]; then error_message "Error creating directory $2 at $1: $SSH_EXEC_ERR" exit $SSH_EXEC_RC