[Libguestfs] [PATCH] appliance: more reliable check for the supermin appliance

Richard W.M. Jones rjones at redhat.com
Fri Apr 28 18:21:30 UTC 2017


On Fri, Apr 28, 2017 at 05:04:15PM +0300, Pavel Butsykin wrote:
> At least two control files (packages and base.tar.gz) are necessary for the
> supermin appliance.
> 
> Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
> ---
>  lib/appliance.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/appliance.c b/lib/appliance.c
> index f12918573..5738e4e7f 100644
> --- a/lib/appliance.c
> +++ b/lib/appliance.c
> @@ -199,7 +199,9 @@ contains_fixed_appliance (guestfs_h *g, const char *path, void *data)
>  static int
>  contains_supermin_appliance (guestfs_h *g, const char *path, void *data)
>  {
> -  return dir_contains_files (g, path, "supermin.d", NULL);
> +  return dir_contains_files (g, path,
> +                             "supermin.d/base.tar.gz",
> +                             "supermin.d/packages", NULL);
>  }

Thanks - I've pushed this.

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




More information about the Libguestfs mailing list