From e396449f9eef8c3feffda616e83db94414f0d11c Mon Sep 17 00:00:00 2001 From: Michael Larabel Date: Sat, 20 Dec 2008 10:42:18 -0500 Subject: pts-core: Improve lspci support for distributions using /sbin/lspci (such as OpenSuSE) --- pts-core/functions/pts-functions_system_parsing.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pts-core') 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)) { -- cgit