From 57cf91e4c64ef86b54261534ef6edce1db82b4d8 Mon Sep 17 00:00:00 2001 From: deajan Date: Wed, 31 Jan 2018 21:04:48 +0100 Subject: [PATCH] Added better failed remote connection log --- dev/ofunctions.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index d0bfe30..e811a5d 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -3,7 +3,7 @@ #### OFUNCTIONS MINI SUBSET #### _OFUNCTIONS_VERSION=2.2.0-dev -_OFUNCTIONS_BUILD=2018010303 +_OFUNCTIONS_BUILD=2018013101 #### _OFUNCTIONS_BOOTSTRAP SUBSET #### _OFUNCTIONS_BOOTSTRAP=true #### _OFUNCTIONS_BOOTSTRAP SUBSET END #### @@ -1441,6 +1441,11 @@ function GetOs { GetOs ENDSSH + if [ $? != 0 ]; then + Logger "Cannot connect to remote system [$REMOTE_HOST] port [$REMOTE_PORT]." "CRITICAL" + exit 1 + fi + if [ -f "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP" ]; then remoteOsVar=$(cat "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP")