From f53859723ef36498720fec9c53051b9c826ebb7f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 16 Nov 2023 10:17:35 +0000 Subject: [PATCH] appliance: Wait for /etc/resolv.conf to be populated Work around this issue with dhcpcd: https://github.com/NetworkConfiguration/dhcpcd/issues/258 Fixes: commit 0e37e5feeaf4380bc971a3105ead8e779a94fa36 --- appliance/init | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/appliance/init b/appliance/init index d41056659..cb200d5bf 100755 --- a/appliance/init +++ b/appliance/init @@ -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