summaryrefslogtreecommitdiffstats
path: root/pts-core
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-12-20 10:42:18 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-12-20 10:42:18 -0500
commite396449f9eef8c3feffda616e83db94414f0d11c (patch)
treee7d0e2e633cc3204f3cd4c5efd9a4622e14abb65 /pts-core
parentebf77735315fbda88c27fbe4400d4ee368995cd3 (diff)
downloadphoronix-test-suite-upstream-e396449f9eef8c3feffda616e83db94414f0d11c.tar.gz
phoronix-test-suite-upstream-e396449f9eef8c3feffda616e83db94414f0d11c.tar.xz
phoronix-test-suite-upstream-e396449f9eef8c3feffda616e83db94414f0d11c.zip
pts-core: Improve lspci support for distributions using /sbin/lspci
(such as OpenSuSE)
Diffstat (limited to 'pts-core')
-rw-r--r--pts-core/functions/pts-functions_system_parsing.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php
index 701e7b7..ebbcbe7 100644
--- a/pts-core/functions/pts-functions_system_parsing.php
+++ b/pts-core/functions/pts-functions_system_parsing.php
@@ -157,7 +157,16 @@ function read_pci($desc, $clean_string = true)
if(empty($pci_info))
{
- $pci_info = shell_exec("lspci 2>&1");
+ if(!is_executable("/usr/bin/lspci") && is_executable("/sbin/lspci"))
+ {
+ $lspci_cmd = "/sbin/lspci";
+ }
+ else
+ {
+ $lspci_cmd = "lspci";
+ }
+
+ $pci_info = shell_exec($lspci_cmd . " 2>&1");
}
if(!is_array($desc))
{