From 8ad8fbb877d897b5b1092b125c0269e0fa3869bb Mon Sep 17 00:00:00 2001 From: Josh Curl Date: Thu, 20 Oct 2016 14:33:03 -0700 Subject: [PATCH] Wait for network before installing in Packet --- scripts/hosting/packet/packet.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/hosting/packet/packet.sh b/scripts/hosting/packet/packet.sh index ebbd5397..f80caaa0 100644 --- a/scripts/hosting/packet/packet.sh +++ b/scripts/hosting/packet/packet.sh @@ -1,8 +1,23 @@ #!/bin/bash -set -e +set -ex + +INSTALLER_IMAGE=rancher/os:v0.7.0 + +ros config set rancher.network.interfaces.eth1.dhcp false +if grep eth2 /proc/net/dev; then + ros config set rancher.network.interfaces.eth0.dhcp false + ros config set rancher.network.interfaces.eth2.dhcp true + system-docker restart network +fi + +for ((i=0;i<30;i++)); do + if system-docker pull ${INSTALLER_IMAGE}; then + break + fi + sleep 1 +done TINKERBELL_URL=$(cat /proc/cmdline | sed -e 's/^.*tinkerbell=//' -e 's/ .*$//')/phone-home -INSTALLER_IMAGE=rancher/os:v0.7.0-rc3 tinkerbell_post() {