On Wed, May 15, 2024 at 09:11:49AM +0200, Olaf Hering wrote: > In case network was requested, but the host lacks both dhclient and > dhcpcd, skip the loop which waits for a resolv.conf update. > > This reduces boot time by 10 seconds. > > Signed-off-by: Olaf Hering <o...@aepfle.de> > --- > > Not runtime tested. > > > appliance/init | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/appliance/init b/appliance/init > index cb200d5bf..128a3c20e 100755 > --- a/appliance/init > +++ b/appliance/init > @@ -119,8 +119,7 @@ if test "$guestfs_network" = 1; then > rm -f /etc/dhcp/dhclient-enter-hooks.d/resolved > if dhclient --version >/dev/null 2>&1; then > dhclient $iface > - else > - dhcpcd $iface > + elif dhcpcd $iface; then > # https://github.com/NetworkConfiguration/dhcpcd/issues/258 > for i in `seq 0 10`; do > if grep nameserver /etc/resolv.conf; then break; fi
Thanks, that's upstream in 4ef645778a Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v _______________________________________________ Libguestfs mailing list -- guestfs@lists.libguestfs.org To unsubscribe send an email to guestfs-le...@lists.libguestfs.org