Last active
April 6, 2018 17:22
-
-
Save lcherone/26ac81257f275f2d05bea62509b3eaef to your computer and use it in GitHub Desktop.
Linux wait for network connection before continuing. Docker, LXC, containers, cloud-init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
echo "Waiting for network connection." | |
while [ 1 ]; do | |
if ping -q -c 1 -W 1 8.8.8.8 > /dev/null 2>&1; then | |
break; | |
fi | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment