This is an automated email from the git hooks/post-receive script.
bernie.ogden pushed a commit to branch inserted_src in repository toolchain/semiautobench.
commit 1e303d1ca358f8e7595eb3b924d2b44ad0427292 Author: Bernard Ogden bernie.ogden@linaro.org Date: Wed Jul 22 15:26:08 2015 +0200
Wait for a private key rather than an agent
Private key doesn't have to be kept up - this is fine so long as we use a one-time key, as is the plan for Jenkins.
Change-Id: I22767bd6a92d66d28e9dbada644d746aeb41b928 --- invoke_session_debian | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/invoke_session_debian b/invoke_session_debian index e860a67..a9c8d50 100755 --- a/invoke_session_debian +++ b/invoke_session_debian @@ -79,8 +79,15 @@ if ! ssh -i ~/data/onetime -o StrictHostKeyChecking=no localhost [...] fi
#This would be two agents if we wanted one for source, one for job -echo "*** WAITING FOR AGENT: ${ip_addr}" -while ! ssh-add -l &> /dev/null; do inotifywait -e create /tmp; done +mkdir ~/data || exit 1 +chmod 700 ~/data || exit 1 +echo "*** WAITING FOR KEY: ${ip_addr}" +while ! test -e ~/data/targetkey; do + inotifywait -e create ~/data +done +chmod 600 ~/data/targetkey || exit 1 +eval `ssh-agent` +ssh-add ~/data/targetkey || exit 1 echo "" mkdir -p /run mkdir -p /run/hacking @@ -98,6 +105,13 @@ for lava_name in `lava-group | grep -v '[[:blank:]]*host$' | aw [...] if test $? -ne 0; then echo "Failed to find IP for ${lava_name}"; sleep infinity [...] if test -z "${target_ip}"; then echo "Failed to find IP for ${lava_name}"; sleep [...] echo "IP ${target_ip}" + + #Check that target is accessible, add to known_hosts + if ! ssh -o StrictHostKeyChecking=no true; then + echo "Could not access target ${target_ip} (${lava_name})" >&2 + exit 1 + fi + target_base="$(echo ${lava_name} | sed 's/[[:digit:]]*$//')" #TODO: HACK if test $? -ne 0; then echo "Failed to find target type from ${lava_name}"; exit 1; fi echo "TYPE ${target_base}"