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