aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2012-11-29 21:39:47 +0000
committerBryn M. Reeves <bmr@redhat.com>2012-11-29 21:39:47 +0000
commit653eb709a3f41f1d4309b31eaf6d4e7ddfaaf27b (patch)
tree01b7833df0fece3a37bcbde73f24b2ebf47f01ab
parenteac6de26675938556865d90bd834c96334c396bd (diff)
downloadsos-653eb709a3f41f1d4309b31eaf6d4e7ddfaaf27b.tar.gz
Add package check to postgresql module
Add a packages list to the postgresql module to prevent it trying to run on systems where the package is not installed and set the tmp_dir variable to None.
-rw-r--r--sos/plugins/postgresql.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py
index f3a44eb3..66a20613 100644
--- a/sos/plugins/postgresql.py
+++ b/sos/plugins/postgresql.py
@@ -10,6 +10,10 @@ from sos.utilities import find
class postgresql(Plugin, RedHatPlugin):
"""PostgreSQL related information"""
+ packages = ('postgresql',)
+
+ tmp_dir = None
+
optionList = [
("pghome", 'PostgreSQL server home directory.', '', '/var/lib/pgsql'),
("username", 'username for pg_dump', '', 'postgres'),