remote_access.sh: Be verbose when remote accesss setup fails. Silent otherwise.

A parallel change in run_remote_tests.sh (http://gerrit.chromium.org/gerrit/8090)
ensures that the output of the command isn't ignored (since now it is only verbose
when it needs to be).

BUG=chromium-os:20695
TEST=Ran run_remote_tests.sh with both valid and invalid ip (again).

Change-Id: I185c81b0a8193bfa5f88ff2b9eea38dabe24edcc
Reviewed-on: http://gerrit.chromium.org/gerrit/8089
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
This commit is contained in:
Gaurav Shah 2011-09-21 16:42:16 -07:00 committed by chrome-bot
parent b2e897bf46
commit af7d5d11a5

View File

@ -54,9 +54,16 @@ function set_up_remote_access() {
chmod 0400 $TMP_PRIVATE_KEY
# Verify the client is reachable before continuing
echo "Initiating first contact with remote host"
remote_sh "true"
echo "Connection OK"
local output
local status=0
if output=$(remote_sh "true" 2>&1); then
:
else
status=$?
echo "Could not initiate first contact with remote host"
echo "$output"
fi
return $status
}
# Ask the target what board it is