[Libguestfs] [PATCH] inspect: use /etc/hosts for detecting Linux root (RHBZ#1203898)

Richard W.M. Jones rjones at redhat.com
Thu Feb 25 09:04:50 UTC 2016


On Wed, Feb 24, 2016 at 05:31:06PM +0100, Pino Toscano wrote:
> On Wednesday 24 February 2016 15:43:40 Pino Toscano wrote:
> > Use /etc/hosts instead of /etc/fstab to detect whether a partition
> > represents the root of a Linux installation; the latter might not exist
> > in smaller/special installations like Docker images.
> > 
> > Put an empty /etc/hosts in all the phony Linux guests to keep them
> > detected as we want.
> > ---
> 
> Discard this version, I'll send a more safe version.

What about /etc/services?  That's been available on every Unix since
4.2BSD (released in 1983).  On Fedora it's part of the 'setup' package.

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