]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
For some reason facter doesn't do booleans the way I expected, and we're
authorStephen Gran <steve@lobefin.net>
Sat, 28 Feb 2009 23:47:21 +0000 (23:47 +0000)
committerStephen Gran <steve@lobefin.net>
Sat, 28 Feb 2009 23:47:21 +0000 (23:47 +0000)
just getting uninitialized constants errors.  Just use strings instead
for now.
Signed-off-by: Stephen Gran <steve@lobefin.net>
facts/raidcontroller.rb

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