From: Stephen Gran Date: Sun, 2 Aug 2009 01:21:30 +0000 (+0100) Subject: let's see if we can make the lspci test quiet X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=c1f2b9d6dfe343b3c5ce732f04d6bb368f64ed2b;p=mirror%2Fdsa-puppet.git let's see if we can make the lspci test quiet Signed-off-by: Stephen Gran --- 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/ }