]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Actually, I don't want an array of controllers, nice as that might be
authorStephen Gran <steve@lobefin.net>
Sat, 28 Feb 2009 23:30:58 +0000 (23:30 +0000)
committerStephen Gran <steve@lobefin.net>
Sat, 28 Feb 2009 23:30:58 +0000 (23:30 +0000)
for other things.  All I really care about is if the machine has
something that looks an HP SmartArray controller, so we can make sure
the extra software is installed.
Signed-off-by: Stephen Gran <steve@lobefin.net>
facts/raidcontroller.rb

index 5ec322ace81ee65c77b56673f5dd8bab59035a8d..157060bc9ce185629d536117423a451d2d0cfb31 100644 (file)
@@ -2,14 +2,14 @@ Facter.add("raidcontroller") do
         confine :kernel => :linux
         ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
         setcode do
-                controllers = []
+                ishp = False
                 lspciexists = system "/bin/bash -c 'which lspci >&/dev//null'"
                 if $?.exitstatus == 0
                         output = %x{lspci}
                         output.each { |s|
-                                controllers.push($1) if s =~ /RAID bus controller: (.*)/
+                                ishp == True if s =~ /RAID bus controller: (.*) Smart Array/
                         }
                 end
-                controllers
+                ishp
         end
 end