summaryrefslogtreecommitdiffstats
path: root/inspector
diff options
context:
space:
mode:
authorMatthew Booth <mbooth@redhat.com>2009-07-16 23:48:25 +0100
committerMatthew Booth <mbooth@redhat.com>2009-07-17 11:29:33 +0100
commit9e90b24c7d76489f93830377e3d7d3c37f36c30c (patch)
treed16cf0a6c997610cf92e9b3be77b46719eaa583e /inspector
parent2ab233b3124f4dd3e7c686de110d9a97cc525c18 (diff)
downloadlibguestfs-9e90b24c7d76489f93830377e3d7d3c37f36c30c.tar.gz
libguestfs-9e90b24c7d76489f93830377e3d7d3c37f36c30c.tar.xz
libguestfs-9e90b24c7d76489f93830377e3d7d3c37f36c30c.zip
Differentiate 'distro' and 'distrofamily' in Sys::Guestfs::Lib
Change distro in the output formally known as virt-inspector to reflect the actual distro. Possible values are now: fedora, rhel, centos, scientific, debian. Add new distrofamily entry which is one of: redhat, debian. Currently all distros except 'debian' are in the redhat family. This allows you to, for example, select a RHEL/CentOS/Scientific Linux specific kernel for installation rather than assuming they're all the same. Note this also changes the behaviour of virt-inspector --query. It will now only return rhel=yes for RHEL.
Diffstat (limited to 'inspector')
-rwxr-xr-xinspector/virt-inspector.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/inspector/virt-inspector.pl b/inspector/virt-inspector.pl
index 3754ceda..5f612e35 100755
--- a/inspector/virt-inspector.pl
+++ b/inspector/virt-inspector.pl
@@ -353,6 +353,7 @@ sub output_text_os
print $os->{os}, " " if exists $os->{os};
print $os->{distro}, " " if exists $os->{distro};
print $os->{version}, " " if exists $os->{version};
+ print "(".$os->{distrofamily}." family)", " " if exists $os->{distrofamily};
print "on ", $os->{root_device}, ":\n";
print __" Mountpoints:\n";
@@ -443,6 +444,7 @@ sub output_xml_os
foreach ( [ "name" => "os" ],
[ "distro" => "distro" ],
+ [ "distrofamily" => "distrofamily" ],
[ "version" => "version" ],
[ "root" => "root_device" ] ) {
$xml->dataElement($_->[0], $os->{$_->[1]}) if exists $os->{$_->[1]};
@@ -623,7 +625,8 @@ sub output_query_rhel
{
my $rhel = "no";
foreach my $os (keys %$oses) {
- $rhel="yes" if $oses->{$os}->{os} eq "linux" && $oses->{$os}->{distro} eq "redhat";
+ $rhel="yes" if ($oses->{$os}->{os} eq "linux" &&
+ $oses->{$os}->{distro} eq "rhel");
}
print "rhel=$rhel\n";
}