From c1f2b9d6dfe343b3c5ce732f04d6bb368f64ed2b Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 2 Aug 2009 02:21:30 +0100 Subject: [PATCH] let's see if we can make the lspci test quiet Signed-off-by: Stephen Gran --- facts/raidarray.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/facts/raidarray.rb b/facts/raidarray.rb index 8a09a71ca..d7bf8a9e8 100644 --- a/facts/raidarray.rb +++ b/facts/raidarray.rb @@ -4,7 +4,7 @@ Facter.add("smartarraycontroller") do setcode do ishp = "false" lspciexists = system "/bin/bash -c 'which lspci >&/dev//null'" - if $?.exitstatus == 0 + if (($?.exitstatus == 0) && (FileTest.exist?("/proc/bus/pci"))) %x{lspci 2>&1}.each { |s| ishp = "true" if s =~ /RAID bus controller: (.*) Smart Array/ } -- 2.20.1