There was a problem in lse_get_distro_codename. When /etc/os-release exists on a RHEL system, the ID=rhel was extracted out of that file and the /etc/redhat-release file was never checked in order to set grep -qi "red hat" /etc/redhat-release && distro=redhat.
That means, depending on whether /etc/os-release exists or not, RHEL was either detected as rhel or redhat.
This PR fixes this by explicitly setting redhat when rhel was extracted.
I'm wondering whether it would be cleaner to do it the other way around and just use rhel as an identifier for RHEL systems within lse. But that would have required touching more portions of the code and especially all CVE checks.
However, I could do that if you prefer that approach.
There was a problem in
lse_get_distro_codename
. When/etc/os-release
exists on a RHEL system, theID=rhel
was extracted out of that file and the/etc/redhat-release
file was never checked in order to setgrep -qi "red hat" /etc/redhat-release && distro=redhat
.That means, depending on whether
/etc/os-release
exists or not, RHEL was either detected asrhel
orredhat
. This PR fixes this by explicitly settingredhat
whenrhel
was extracted.I'm wondering whether it would be cleaner to do it the other way around and just use
rhel
as an identifier for RHEL systems within lse. But that would have required touching more portions of the code and especially all CVE checks. However, I could do that if you prefer that approach.