diff options
-rw-r--r-- | sos/plugins/cs.py | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/sos/plugins/cs.py b/sos/plugins/cs.py index 7ae79d3e..bc0c84b1 100644 --- a/sos/plugins/cs.py +++ b/sos/plugins/cs.py @@ -26,6 +26,18 @@ class CertificateSystem(Plugin, RedHatPlugin): plugin_name = 'certificatesystem' + packages = ( + "redhat-cs", + "rhpki-common", + "pki-common" + ) + + files = ( + "/opt/redhat-cs", + "/usr/share/java/rhpki", + "/usr/share/java/pki" + ) + def checkversion(self): if self.is_installed("redhat-cs") or exists("/opt/redhat-cs"): return 71 @@ -36,16 +48,6 @@ class CertificateSystem(Plugin, RedHatPlugin): return 8 return False - def check_enabled(self): - if self.is_installed("redhat-cs") or \ - self.is_installed("rhpki-common") or \ - self.is_installed("pki-common") or \ - exists("/opt/redhat-cs") or \ - exists("/usr/share/java/rhpki") or \ - exists("/usr/share/java/pki"): - return True - return False - def setup(self): csversion = self.checkversion() if not csversion: @@ -63,7 +65,8 @@ class CertificateSystem(Plugin, RedHatPlugin): "/opt/redhat-cs/cert-*/system", "/opt/redhat-cs/cert-*/transactions", "/opt/redhat-cs/cert-*/debug", - "/opt/redhat-cs/cert-*/tps-debug.log"]) + "/opt/redhat-cs/cert-*/tps-debug.log" + ]) if csversion == 73: self.add_copy_specs([ "/var/lib/rhpki-*/conf/*cfg*", @@ -72,12 +75,14 @@ class CertificateSystem(Plugin, RedHatPlugin): "/var/lib/rhpki-*/logs/catalina.*", "/var/lib/rhpki-*/logs/ra-debug.log", "/var/lib/rhpki-*/logs/transactions", - "/var/lib/rhpki-*/logs/system"]) + "/var/lib/rhpki-*/logs/system" + ]) if csversion in (73, 8): self.add_copy_specs([ "/etc/dirsrv/slapd-*/dse.ldif", "/var/log/dirsrv/slapd-*/access", - "/var/log/dirsrv/slapd-*/errors"]) + "/var/log/dirsrv/slapd-*/errors" + ]) if csversion == 8: self.add_copy_specs([ "/etc/pki-*/CS.cfg", @@ -86,6 +91,7 @@ class CertificateSystem(Plugin, RedHatPlugin): "/var/log/pki-*/catalina.*", "/var/log/pki-*/ra-debug.log", "/var/log/pki-*/transactions", - "/var/log/pki-*/system"]) + "/var/log/pki-*/system" + ]) # vim: et ts=4 sw=4 |