Commit d8a12a7e authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Copy OSFAMILY to OS property if distro is unknown

If libguestfs's inspect_get_distro returns "unknown", then use the
OSFAMILY image property value as OS value.
parent 6d7f7fce
......@@ -82,6 +82,8 @@ class OSBase(object):
self.meta['ROOT_PARTITION'] = "%d" % self.g.part_to_partnum(self.root)
self.meta['OSFAMILY'] = self.g.inspect_get_type(self.root)
self.meta['OS'] = self.g.inspect_get_distro(self.root)
if self.meta['OS'] == "unknown":
self.meta['OS'] = self.meta['OSFAMILY']
self.meta['DESCRIPTION'] = self.g.inspect_get_product_name(self.root)
def _is_sysprep(self, obj):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment