From 82f914e0dcf06655842da7a5fac02a1fea9e4bea Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Wed, 7 Nov 2018 15:11:47 -0800 Subject: [PATCH] Work around AWS boot check weirdness --- net/gce.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/gce.sh b/net/gce.sh index 2ef3bc1894..2bfa4ea720 100755 --- a/net/gce.sh +++ b/net/gce.sh @@ -236,9 +236,11 @@ EOF echo "Waiting for $name to finish booting..." ( - set -x + set -x +e for i in $(seq 1 60); do - if timeout 20s ssh "${sshOptions[@]}" "$publicIp" "test -f /.instance-startup-complete"; then + timeout 20s ssh "${sshOptions[@]}" "$publicIp" "ls -l /.instance-startup-complete" + ret=$? + if [[ $ret -eq 0 ]]; then exit 0 fi sleep 2