Wrap text
Report abuse
raidctrl_name = "none"
check_linuxmd = ((%x{cat /proc/mdstat 2>/dev/null}.to_s =~ /^md.*: .*raid/m) != nil)
if check_linuxmd then
raidctrl_name = "linuxmd"
end
check_cciss = %x{/usr/bin/lspci -d '103c:' 2>/dev/null}.to_s
if check_cciss.include?("Smart Array") or check_cciss.include?("3238") then
raidctrl_name = "cciss"
end
check_areca = %x{/usr/bin/lspci -d '17d3:' 2>/dev/null}.to_s
if check_areca.include?("RAID") then
raidctrl_name = "areca"
end
Facter.add("raidctrl") do
setcode do
result = raidctrl_name
end
end