]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
(over?)simplify the test for a smartarray controller
authorStephen Gran <steve@lobefin.net>
Wed, 5 Aug 2009 21:51:33 +0000 (22:51 +0100)
committerStephen Gran <steve@lobefin.net>
Wed, 5 Aug 2009 21:51:33 +0000 (22:51 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
facts/raidarray.rb

index 31d5b7938d4cffe39d542a07717628a50c690e36..2e8773b97e7a2bbba901a15674a329631bdd3655 100644 (file)
@@ -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