1
0
forked from rpms/sos
sos/sos-bz678665-collect-entitlement-certs.patch
Bryn M. Reeves 13178ca5fa Update sos to 2.2-29
This synchronises sos in master to the current upstream sos-2.2 branch and
includes all patches from RHEL6 not already present.
2012-06-22 12:16:21 +01:00

28 lines
1.3 KiB
Diff

diff -up sos-2.2/sos/plugins/general.py.orig sos-2.2/sos/plugins/general.py
--- sos-2.2/sos/plugins/general.py.orig 2011-02-24 19:41:50.000000000 +0000
+++ sos-2.2/sos/plugins/general.py 2011-02-24 19:43:02.000000000 +0000
@@ -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: