From 81149fa5d3ad55a24be3910667e3586c39ffa71e Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Wed, 5 Aug 2009 22:51:33 +0100 Subject: [PATCH] (over?)simplify the test for a smartarray controller Signed-off-by: Stephen Gran --- facts/raidarray.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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 -- 2.20.1