[Libguestfs] [PATCH v2 1/4] appliance: Use dhclient instead of hard-coding IP address of appliance.

Richard W.M. Jones rjones at redhat.com
Thu Oct 2 12:05:01 UTC 2014


On Thu, Oct 02, 2014 at 01:53:45PM +0200, Olaf Hering wrote:
> On Thu, Oct 02, Richard W.M. Jones wrote:
> 
> > The script won't fail, but the network won't work.  What's the
> > alternative on SuSE?
> 
> I think that would be dhcpcd, which is also used by NetworkManager.

It turns out we don't package dhcpcd in Fedora.  If we did
the following, would it work?

if grep -sq guestfs_network=1 /proc/cmdline; then
  if dhclient --version >/dev/null 2>&1; then
    dhclient
  else
    dhcpcd
  fi
fi

It seems as if it would, from reading the dhcpcd man page ..

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list