aboutsummaryrefslogtreecommitdiff
path: root/etc/bootstrap/bbot-bootstrap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'etc/bootstrap/bbot-bootstrap.sh')
-rwxr-xr-xetc/bootstrap/bbot-bootstrap.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/etc/bootstrap/bbot-bootstrap.sh b/etc/bootstrap/bbot-bootstrap.sh
index 65deddc..9473abe 100755
--- a/etc/bootstrap/bbot-bootstrap.sh
+++ b/etc/bootstrap/bbot-bootstrap.sh
@@ -100,7 +100,15 @@ run rm -rf "$build/bootstrap"
run mkdir -p "$build/bootstrap"
run cd "$build/bootstrap"
-run curl -s -S -O "tftp://$tftp/build2-toolchain.tar.xz"
+# We could be running on a new network which may take some time to setup.
+# And if we start before that happens, we will be hanging forever.
+#
+while true; do
+ diag "+ curl -s -S -O --connect-timeout 5 --max-time 60 tftp://$tftp/build2-toolchain.tar.xz"
+ if curl -s -S -O --connect-timeout 5 --max-time 60 "tftp://$tftp/build2-toolchain.tar.xz"; then
+ break
+ fi
+done
run tar -xf build2-toolchain.tar.xz
run rm build2-toolchain.tar.xz