Work around AWS boot check weirdness

This commit is contained in:
Michael Vines
2018-11-07 15:11:47 -08:00
parent 2e14bfcf4e
commit bfadd7b787

View File

@ -236,9 +236,11 @@ EOF
echo "Waiting for $name to finish booting..." echo "Waiting for $name to finish booting..."
( (
set -x set -x +e
for i in $(seq 1 60); do 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 exit 0
fi fi
sleep 2 sleep 2