aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-04-16 15:03:46 +0100
committerBryn M. Reeves <bmr@redhat.com>2013-04-16 15:03:46 +0100
commit8883155447c58abf42354b042f7b403e2f6dd81e (patch)
tree49ac94d6c901c4f968491d1173eb78f4d57220f5
parent256bc4667d33d3c6c0e41fb5a871c72a195de09a (diff)
downloadsos-8883155447c58abf42354b042f7b403e2f6dd81e.tar.gz
Remove PATH workarounds from hardware plug-in
The hardware plug-in contains code to check for the existence of binaries before running them. This won't work if plug-ins are providing non-absolute paths for executables and is redundant in any case since the shell-out wrappers already do this and log unavailable binaries. Also removes the workaround for lsusb changing path in recent versions. Signed-of-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/hardware.py19
1 files changed, 6 insertions, 13 deletions
diff --git a/sos/plugins/hardware.py b/sos/plugins/hardware.py
index 10601f67..75f6f7f9 100644
--- a/sos/plugins/hardware.py
+++ b/sos/plugins/hardware.py
@@ -49,23 +49,16 @@ class hardware(Plugin):
self.add_cmd_output("dmidecode", root_symlink = "dmidecode")
- if os.path.exists("cpufreq-info"):
- self.add_cmd_output("cpufreq-info")
- if os.path.exists("cpupower"):
- self.add_cmd_output("cpupower info")
- self.add_cmd_output("cpupower frequency-info")
+ self.add_cmd_output("cpufreq-info")
+ self.add_cmd_output("cpupower info")
+ self.add_cmd_output("cpupower frequency-info")
if self.policy().get_arch().endswith("386"):
self.add_cmd_output("x86info -a")
- if os.path.exists("lsusb"):
- lsusb_path = "lsusb"
- else:
- lsusb_path = "lsusb"
-
- self.add_cmd_output("%s"% lsusb_path)
- self.add_cmd_output("%s -v"% lsusb_path)
- self.add_cmd_output("%s -t"% lsusb_path)
+ self.add_cmd_output("lsusb")
+ self.add_cmd_output("lsusb -v")
+ self.add_cmd_output("lsusb -t")
self.add_cmd_output("lshal")
self.add_cmd_output("systool -c fc_host -v")