home-cloud/modules/docker_node/scripts/wait-cloud-init.sh

13 lines
359 B
Bash
Raw Normal View History

2019-01-30 19:49:47 +01:00
# cloud-init is running at boot time and blocking access to apt.
# Before doing anything we should wait for it to finish.
# cloud-init creates a file after finishing boot.
echo "Waiting for cloud-init to finish provisioning the instance."
while [ ! -f /var/lib/cloud/instance/boot-finished ]
do
echo "#"
sleep 2
done
# Wait some more to be sure
sleep 10