1 Facter.add("smartarraycontroller") do
2 confine :kernel => :linux
3 ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
6 if ((FileTest.executable?("/usr/bin/lspci")) && (FileTest.exist?("/proc/bus/pci")))
8 ishp = "true" if s =~ /RAID bus controller: (.*) Smart Array/
15 Facter.add("mptcontroller") do
16 confine :kernel => :linux
18 FileTest.exist?("/proc/mpt/summary")
22 Facter.add("3warecontroller") do
23 confine :kernel => :linux
26 if FileTest.exist?("/proc/scsi/scsi")
27 IO.foreach("/proc/scsi/scsi") { |x|
28 is3w = "true" if x =~ /Vendor: 3ware/
35 Facter.add("swraid") do
36 confine :kernel => :linux
39 if FileTest.exist?("/proc/mdstat") && FileTest.exist?("/sbin/mdadm")
40 IO.foreach("/proc/mdstat") { |x|
41 swraid = "true" if x =~ /md[0-9]+ : active/