diff options
author | Miguel Angel Ajo <majopela@redhat.com> | 2018-10-10 16:04:11 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-03-18 12:08:07 +0000 |
commit | 3d6face4a23304bc85548ffb1177f214bd925ccc (patch) | |
tree | 403b12afbb5d018d3b8c6231995c6642c8aa958c | |
parent | b3d668e2d97109d7c4b7a47ba687b8c381e51061 (diff) | |
download | sos-3d6face4a23304bc85548ffb1177f214bd925ccc.tar.gz |
[policies] Detect CentOS distribution without D/S patches
This partially fixes issue #1264 by handling the CentOS and
CentOS Atomic hosts, partially based on the CentOS packaging
patch [1]. Without this patch, if you try to develop sosreports
on a CentOS host, you will get an empty list of plugins.
[1] https://git.centos.org/blob/rpms!sos.git/c7/SOURCES!sos-3.4-centos-branding.patch
Resolves: #1447
Signed-off-by: Miguel Angel Ajo <majopela@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/policies/redhat.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py index 1d1606b6..580b7454 100644 --- a/sos/policies/redhat.py +++ b/sos/policies/redhat.py @@ -281,7 +281,7 @@ support representative. if line.startswith("NAME"): (name, value) = line.split("=") value = value.strip("\"'") - if value.startswith(RHEL_RELEASE_STR): + if value.startswith(cls.distro): return True return False @@ -325,6 +325,12 @@ support representative. return self.find_preset(RHEL) +class CentOsPolicy(RHELPolicy): + distro = "CentOS" + vendor = "CentOS" + vendor_url = "http://www.centos.org/" + + ATOMIC = "atomic" ATOMIC_RELEASE_STR = "Atomic" ATOMIC_DESC = "Red Hat Enterprise Linux Atomic Host" @@ -405,6 +411,12 @@ support representative. return self.find_preset(RHOCP) +class CentOsAtomicPolicy(RedHatAtomicPolicy): + distro = "CentOS Atomic Host" + vendor = "CentOS" + vendor_url = "http://www.centos.org/" + + class FedoraPolicy(RedHatPolicy): distro = "Fedora" |