From 02eeba4b1e624fdd810af7ac208e4bcabcf253d3 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Thu, 24 Feb 2011 09:00:00 +0000 Subject: Add support for collecting entitlement certificates in rhn.py Resolves: bz678665 --- sos/plugins/general.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sos/plugins/general.py b/sos/plugins/general.py index c3549060..960c0c68 100644 --- a/sos/plugins/general.py +++ b/sos/plugins/general.py @@ -25,6 +25,7 @@ class general(sos.plugintools.PluginBase): ("all_logs", "collect all log files defined in syslog.conf", "", False)] def setup(self): + rhelver = self.policy().rhelVersion() self.addCopySpec("/etc/redhat-release") self.addCopySpec("/etc/fedora-release") self.addCopySpec("/etc/inittab") @@ -49,8 +50,14 @@ class general(sos.plugintools.PluginBase): self.collectExtOutput("/usr/sbin/alternatives --display java", root_symlink = "java") self.collectExtOutput("/usr/bin/readlink -f /usr/bin/java") + # new entitlement certificate support + if rhelver == 6 or rhelver == 5: + self.addCopySpec("/etc/pki/product/*.pem") + self.addCopySpec("/etc/pki/consumer/cert.pem") + self.addCopySpec("/etc/pki/entitlement/*.pem") + self.addForbiddenPath("/etc/pki/entitlement/key.pem") + if self.getOption('all_logs'): - rhelver = self.policy().rhelVersion() if rhelver == 5 or rhelver == 4: logs=self.doRegexFindAll(r"^\S+\s+(\/.*log.*)\s+$", "/etc/syslog.conf") for i in logs: -- cgit