added rhel to CentOS (#366)

This commit is contained in:
Jameson Pugh
2020-03-13 06:48:46 -04:00
committed by GitHub
parent e6546710c6
commit 74fd1cc5ef
2 changed files with 22 additions and 1 deletions

View File

@@ -53,7 +53,7 @@ impl Distribution {
}
Ok(match id {
Some("centos") | Some("ol") => Distribution::CentOS,
Some("centos") | Some("rhel") | Some("ol") => Distribution::CentOS,
Some("clear-linux-os") => Distribution::ClearLinux,
Some("fedora") => Distribution::Fedora,
Some("void") => Distribution::Void,
@@ -482,6 +482,11 @@ mod tests {
test_template(&include_str!("os_release/centos"), Distribution::CentOS);
}
#[test]
fn test_rhel() {
test_template(&include_str!("os_release/rhel"), Distribution::CentOS);
}
#[test]
fn test_clearlinux() {
test_template(&include_str!("os_release/clearlinux"), Distribution::ClearLinux);

View File

@@ -0,0 +1,16 @@
NAME="Red Hat Enterprise Linux"
VERSION="8.1 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.1"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.1 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8.1:GA"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.1
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.1"