mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
appliance: only wait for resolv.conf update if dhcpcd succeeded
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 <olaf@aepfle.de>
(cherry picked from commit 4ef645778a)
This commit is contained in:
committed by
Richard W.M. Jones
parent
06205bdf30
commit
c4b256cebf
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user