From: Stephen Gran Date: Sat, 28 Feb 2009 23:47:21 +0000 (+0000) Subject: For some reason facter doesn't do booleans the way I expected, and we're X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=25de7df83fd1f5f38806e08b903670fd4d2536c7;p=mirror%2Fdsa-puppet.git For some reason facter doesn't do booleans the way I expected, and we're just getting uninitialized constants errors. Just use strings instead for now. Signed-off-by: Stephen Gran --- diff --git a/facts/raidcontroller.rb b/facts/raidcontroller.rb index 157060bc9..1d6b631d1 100644 --- a/facts/raidcontroller.rb +++ b/facts/raidcontroller.rb @@ -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