Use getent instead of ping

This commit is contained in:
Kayou 2020-05-03 23:44:49 +02:00 committed by GitHub
parent be94a5cc10
commit 29d69e1a94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@ wait_container()
# Wait for container to access the internet
for j in $(seq 1 10); do
if lxc exec "$1" -- /bin/bash -c "ping -q -c 2 security.debian.org" >/dev/null 2>/dev/null; then
if lxc exec "$1" -- /bin/bash -c "getent hosts debian.org" >/dev/null 2>/dev/null; then
break
fi
@ -188,4 +188,4 @@ update_image() {
lxc stop "$image_to_update-tmp"
lxc delete "$image_to_update-tmp"
}
}