From: Stephen Gran Date: Wed, 5 Aug 2009 21:51:33 +0000 (+0100) Subject: (over?)simplify the test for a smartarray controller X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=81149fa5d3ad55a24be3910667e3586c39ffa71e;p=mirror%2Fdsa-puppet.git (over?)simplify the test for a smartarray controller Signed-off-by: Stephen Gran --- diff --git a/facts/raidarray.rb b/facts/raidarray.rb index 31d5b7938..2e8773b97 100644 --- a/facts/raidarray.rb +++ b/facts/raidarray.rb @@ -1,14 +1,7 @@ Facter.add("smartarraycontroller") do confine :kernel => :linux - ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin" setcode do - ishp = "false" - if ((FileTest.executable?("/usr/bin/lspci")) && (FileTest.exist?("/proc/bus/pci"))) - %x{lspci}.each { |s| - ishp = "true" if s =~ /RAID bus controller: (.*) Smart Array/ - } - end - ishp == "true" + FileTest.exist?("/dev/cciss/") end end