mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 22:51:03 +02:00
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:
parent
b2e897bf46
commit
af7d5d11a5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user