diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-03-08 08:10:19 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-03-08 08:10:19 +0000 |
commit | c1a227a960066fb9552e0c225bc473be365b67b0 (patch) | |
tree | 9de10c3fa6b07491a72878b8aea5dac2144ccab4 /perl/lib | |
parent | a9d6b948b590f58023a97dddd76302e40d49d2e2 (diff) | |
download | libguestfs-c1a227a960066fb9552e0c225bc473be365b67b0.tar.gz libguestfs-c1a227a960066fb9552e0c225bc473be365b67b0.tar.xz libguestfs-c1a227a960066fb9552e0c225bc473be365b67b0.zip |
Detect Red Hat Desktop as 'rhel' distro (RHBZ#682979).
/etc/redhat-release on Red Hat Desktop contains the following
string:
Red Hat Desktop release 4 (Nahant Update 8)
Previously we matched against the string "Red Hat Enterprise Linux"
but since this does not contain that string, this distro wasn't being
detected correctly.
Note this also changes the obsolete Perl code, for the benefit of
virt-v2v.
Diffstat (limited to 'perl/lib')
-rw-r--r-- | perl/lib/Sys/Guestfs/Lib.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index 393eb8ad..97d0e8ec 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -524,12 +524,12 @@ sub _check_linux_root $r->{package_management} = "yum"; } - elsif (/(Red Hat Enterprise Linux|CentOS|Scientific Linux)/) { + elsif (/(Red Hat|CentOS|Scientific Linux)/) { chomp; $r->{product_name} = $_; my $distro = $1; - if($distro eq "Red Hat Enterprise Linux") { + if($distro eq "Red Hat") { $r->{osdistro} = "rhel"; } |