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>
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