appliance: Wait for /etc/resolv.conf to be populated

Work around this issue with dhcpcd:
https://github.com/NetworkConfiguration/dhcpcd/issues/258

Fixes: commit 0e37e5feea
This commit is contained in:
Richard W.M. Jones
2023-11-16 10:17:35 +00:00
parent 0e37e5feea
commit f53859723e

View File

@@ -121,6 +121,11 @@ if test "$guestfs_network" = 1; then
dhclient $iface
else
dhcpcd $iface
# https://github.com/NetworkConfiguration/dhcpcd/issues/258
for i in `seq 0 10`; do
if grep nameserver /etc/resolv.conf; then break; fi
sleep 1
done
fi
fi