aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorastokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8>2009-06-09 22:50:49 +0000
committerastokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8>2009-06-09 22:50:49 +0000
commit706b0cb007a021ef8458742863507c508890b031 (patch)
treef23a91bef50ac845e621b217a60077e6cfe045ac /src/lib
parentb67678160784367bfe3c5b713f516e91cbac3bd6 (diff)
downloadsos-706b0cb007a021ef8458742863507c508890b031.tar.gz
- make sure all relevant rhel plugins made it to trunk
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@579 ef72aa8b-4018-0410-8976-d6e080ef94d8
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/sos/plugins/anaconda.py6
-rw-r--r--src/lib/sos/plugins/hardware.py1
-rw-r--r--src/lib/sos/plugins/ipa.py2
-rw-r--r--src/lib/sos/plugins/named.py37
-rw-r--r--src/lib/sos/plugins/s390.py2
-rw-r--r--src/lib/sos/plugins/startup.py2
-rw-r--r--src/lib/sos/plugins/system.py2
-rw-r--r--src/lib/sos/plugins/systemtap.py1
-rw-r--r--src/lib/sos/plugins/xen.py2
9 files changed, 30 insertions, 25 deletions
diff --git a/src/lib/sos/plugins/anaconda.py b/src/lib/sos/plugins/anaconda.py
index 06434c70..7e40a60d 100644
--- a/src/lib/sos/plugins/anaconda.py
+++ b/src/lib/sos/plugins/anaconda.py
@@ -19,11 +19,7 @@ class anaconda(sos.plugintools.PluginBase):
"""Anaconda / Installation information
"""
def checkenabled(self):
- try:
- os.stat("/var/log/anaconda.log")
- except:
- pass
- else:
+ if os.path.exists("/var/log/anaconda.log"):
return True
return False
diff --git a/src/lib/sos/plugins/hardware.py b/src/lib/sos/plugins/hardware.py
index 97e51fd2..178f35d5 100644
--- a/src/lib/sos/plugins/hardware.py
+++ b/src/lib/sos/plugins/hardware.py
@@ -34,6 +34,7 @@ class hardware(sos.plugintools.PluginBase):
self.addCopySpec("/proc/chandev")
self.addCopySpec("/proc/dasd")
self.addCopySpec("/proc/s390dbf/tape")
+ self.addCopySpec("/sys/bus/scsi")
self.collectExtOutput("/usr/share/rhn/up2date_client/hardware.py")
self.collectExtOutput("""/bin/echo -e "lspci:\n" ; /sbin/lspci ; /bin/echo -e "\nlspci -nvv:\n" ; /sbin/lspci -nvv ; /bin/echo -e "\nlspci -tv:\n" ; /sbin/lspci -tv""", suggest_filename = "lspci", root_symlink = "lspci")
diff --git a/src/lib/sos/plugins/ipa.py b/src/lib/sos/plugins/ipa.py
index af8a2c5a..2c6ca9b6 100644
--- a/src/lib/sos/plugins/ipa.py
+++ b/src/lib/sos/plugins/ipa.py
@@ -31,5 +31,7 @@ class ipa(sos.plugintools.PluginBase):
def setup(self):
self.addCopySpec("/etc/dirsrv/ds.keytab")
self.addCopySpec("/etc/ipa/ipa.conf")
+ self.addCopySpec("/etc/krb5.conf")
+ self.addCopySpec("/etc/krb5.keytab")
return
diff --git a/src/lib/sos/plugins/named.py b/src/lib/sos/plugins/named.py
index 78bf4ee6..69695de6 100644
--- a/src/lib/sos/plugins/named.py
+++ b/src/lib/sos/plugins/named.py
@@ -14,27 +14,30 @@
import sos.plugintools
import commands
-import os
+from os.path import normpath, join, exists
class named(sos.plugintools.PluginBase):
"""named related information
"""
def checkenabled(self):
- self.files = [ "/etc/named.conf", "/etc/sysconfig/named" ]
- self.packages = [ "bind", "bind-chroot" ]
- return sos.plugintools.PluginBase.checkenabled(self)
+ if self.cInfo["policy"].pkgByName("bind") or exists("/etc/named.conf") or exists("/etc/sysconfig/named"):
+ return True
+ return False
+
+ def getDnsDir(self, configFile):
+ """ grab directory path from named{conf,boot}
+ """
+ directoryList = self.doRegexFindAll("directory\s\"(.*)\"", configFile)
+ return normpath(directoryList[0])
def setup(self):
- dnsdir = ""
- self.addCopySpec("/etc/named.boot")
- self.addCopySpec("/etc/named.conf")
- self.addCopySpec("/etc/sysconfig/named")
- if os.access("/etc/named.conf", os.R_OK):
- dnsdir = commands.getoutput("/bin/grep -i directory /etc/named.conf | /bin/gawk '{print $2}' | /bin/sed 's/\\\"//g' | /bin/sed 's/\;//g'")
- if os.access("/etc/named.boot", os.R_OK):
- dnsdir = commands.getoutput("/bin/grep -i directory /etc/named.boot | /bin/gawk '{print $2}' | /bin/sed 's/\\\"//g' | /bin/sed 's/\;//g'")
- if '' != dnsdir.strip():
- self.addCopySpec(dnsdir)
- self.addForbiddenPath('/var/named/chroot/proc')
- self.addForbiddenPath('/var/named/chroot/dev')
- return
+ cfgFiles = ("/etc/named.conf",
+ "/etc/named.boot")
+ for cfg in cfgFiles:
+ if exists(cfg):
+ self.addCopySpec(cfg)
+ self.addCopySpec(self.getDnsDir(cfg))
+ self.addForbiddenPath(join(self.getDnsDir(cfg),"chroot/dev"))
+ self.addForbiddenPath(join(self.getDnsDir(cfg),"chroot/proc"))
+ self.addCopySpec("/etc/sysconfig/named")
+ return
diff --git a/src/lib/sos/plugins/s390.py b/src/lib/sos/plugins/s390.py
index 005be111..96a6ba8d 100644
--- a/src/lib/sos/plugins/s390.py
+++ b/src/lib/sos/plugins/s390.py
@@ -57,8 +57,6 @@ class s390(sos.plugintools.PluginBase):
self.addCopySpec("/etc/chandev.conf")
self.collectExtOutput("/sbin/lscss")
self.collectExtOutput("/sbin/lsdasd")
- self.collectExtOutput("/sbin/lsqeth")
- self.collectExtOutput("/sbin/lszfcp")
self.collectExtOutput("/sbin/lstape")
self.collectExtOutput("find /sys -type f")
self.collectExtOutput("find /proc/s390dbf -type f")
diff --git a/src/lib/sos/plugins/startup.py b/src/lib/sos/plugins/startup.py
index a0d3e400..463f95fb 100644
--- a/src/lib/sos/plugins/startup.py
+++ b/src/lib/sos/plugins/startup.py
@@ -19,7 +19,9 @@ class startup(sos.plugintools.PluginBase):
"""
def setup(self):
self.addCopySpec("/etc/rc.d")
+
self.collectExtOutput("/sbin/chkconfig --list", root_symlink = "chkconfig")
+ self.collectExtOutput("/sbin/service --status-all")
self.collectExtOutput("/sbin/runlevel")
return
diff --git a/src/lib/sos/plugins/system.py b/src/lib/sos/plugins/system.py
index e7783167..74f6804a 100644
--- a/src/lib/sos/plugins/system.py
+++ b/src/lib/sos/plugins/system.py
@@ -21,9 +21,11 @@ class system(sos.plugintools.PluginBase):
self.addCopySpec("/proc/sys")
self.addCopySpec("/etc/sysctl.conf")
self.addCopySpec("/etc/cron*")
+ self.addCopySpec("/var/log/cron*")
self.addCopySpec("/etc/syslog.conf")
self.addCopySpec("/etc/ntp.conf")
self.addCopySpec("/etc/ntp/step-tickers")
self.addCopySpec("/etc/ntp/ntpservers")
+ self.collectExtOutput("/usr/bin/crontab -l")
return
diff --git a/src/lib/sos/plugins/systemtap.py b/src/lib/sos/plugins/systemtap.py
index beab832c..fc6c86db 100644
--- a/src/lib/sos/plugins/systemtap.py
+++ b/src/lib/sos/plugins/systemtap.py
@@ -30,5 +30,6 @@ class systemtap(sos.plugintools.PluginBase):
# FIXME: do not use rpm -qa
self.collectExtOutput("/bin/rpm -qa | /bin/egrep -e kernel.*`uname -r` -e systemtap -e elfutils | sort")
self.collectExtOutput("/usr/bin/stap -V 2")
+ self.collectExtOutput("/bin/uname -r")
return
diff --git a/src/lib/sos/plugins/xen.py b/src/lib/sos/plugins/xen.py
index 4126f720..a4adca75 100644
--- a/src/lib/sos/plugins/xen.py
+++ b/src/lib/sos/plugins/xen.py
@@ -22,7 +22,7 @@ class xen(sos.plugintools.PluginBase):
"""
def determineXenHost(self):
if os.access("/proc/acpi/dsdt", os.R_OK):
- (status, output) = commands.getstatusoutput("/usr/bin/strings /proc/acpi/dsdt | grep -q int-xen")
+ (status, output) = commands.getstatusoutput("grep -qi xen /proc/acpi/dsdt")
if status == 0:
return "hvm"