13178ca5fa
This synchronises sos in master to the current upstream sos-2.2 branch and includes all patches from RHEL6 not already present.
30 lines
1.4 KiB
Diff
30 lines
1.4 KiB
Diff
diff -up sos-2.2/sos/plugins/hardware.py.orig sos-2.2/sos/plugins/hardware.py
|
|
--- sos-2.2/sos/plugins/hardware.py.orig 2011-09-23 16:00:34.000000000 +0100
|
|
+++ sos-2.2/sos/plugins/hardware.py 2011-09-23 16:00:55.000000000 +0100
|
|
@@ -13,6 +13,7 @@
|
|
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
import sos.plugintools
|
|
+import os
|
|
|
|
class hardware(sos.plugintools.PluginBase):
|
|
"""hardware related information
|
|
@@ -44,9 +45,14 @@ class hardware(sos.plugintools.PluginBas
|
|
if self.policy().getArch().endswith("386"):
|
|
self.collectExtOutput("/usr/sbin/x86info -a")
|
|
|
|
- self.collectExtOutput("/usr/sbin/lsusb")
|
|
- self.collectExtOutput("/usr/sbin/lsusb -v")
|
|
- self.collectExtOutput("/usr/sbin/lsusb -t 2>&1", suggest_filename = "lsusb_-t")
|
|
+ if os.path.exists("/usr/bin/lsusb"):
|
|
+ self.collectExtOutput("/usr/bin/lsusb")
|
|
+ self.collectExtOutput("/usr/bin/lsusb -v")
|
|
+ self.collectExtOutput("/usr/bin/lsusb -t 2>&1", suggest_filename = "lsusb_-t")
|
|
+ elif os.path.exists("/sbin/lsusb"):
|
|
+ self.collectExtOutput("/sbin/lsusb")
|
|
+ self.collectExtOutput("/sbin/lsusb -v")
|
|
+ self.collectExtOutput("/sbin/lsusb -t 2>&1", suggest_filename = "lsusb_-t")
|
|
self.collectExtOutput("/usr/bin/lshal")
|
|
self.collectExtOutput("/usr/bin/systool -c fc_host -v")
|
|
self.collectExtOutput("/usr/bin/systool -c scsi_host -v")
|