Subject: | Sys::Info::Driver::Linux::OS::Distribution::_probe_release() returns 'centos' as the DISTRIB_ID for Red Hat Enterprise Linux Server release 5.7 (Tikanga) |
Hello and thank you for Sys::Info::Driver::Linux
On...
cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
Sys::Info::Driver::Linux::OS::Distribution::_probe_release() returns
'centos' as the DISTRIB_ID
and not 'redhat' because /etc/redhat-release exists and
/etc/redhat_version does not, the Conf.pm contains:
<redhat>
version_match = Red Hat Linux release (.*) \(
release = redhat-release
release = redhat_version
</redhat>
But the hash used only contains:
{
...
'redhat-release' => 'centos',
...
'redhat_version' => 'redhat',
...
};
I ended up making these changes (they will not work if you are on
centos)
Sys-Info-Driver-Linux-
0.7801/lib/Sys/Info/Driver/Linux/OS/Distribution/Conf.pm
22,27d21
< <centos>
< manufacturer = Lance Davis
< release = redhat-release
< version_match = CentOS release (.*) \(
< </centos>
<
147c141,142
< version_match = Red Hat Linux release (.*) \(
---
Show quoted text
> manufacturer = Red Hat
> version_match = Red Hat .*Linux .*release (.*) \(
149d143
< release = redhat_version
To differentiate between centos and redhat by /etc/$id file I think the
code will also need to check the contents of the file.
Cheers,
Peter (Stig) Edwards