1 Facter.add("smartarraycontroller") do
2 confine :kernel => :linux
3 ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
6 lspciexists = system "/bin/bash -c 'which lspci >&/dev//null'"
8 %x{lspci 2>&1}.each { |s|
9 ishp = "true" if s =~ /RAID bus controller: (.*) Smart Array/
16 Facter.add("mptcontroller") do
17 confine :kernel => :linux
19 FileTest.exist?("/proc/mpt/summary")
23 Facter.add("3warecontroller") do
24 confine :kernel => :linux
27 if FileTest.exist?("/proc/scsi/scsi")
28 IO.foreach("/proc/scsi/scsi") { |x|
29 is3w = "true" if x =~ /Vendor: 3ware/
36 Facter.add("swraid") do
37 confine :kernel => :linux
40 if FileTest.exist?("/proc/mdstat") && FileTest.exist?("/sbin/mdadm")
41 IO.foreach("/proc/mdstat") { |x|
42 swraid = "true" if x =~ /md[0-9]+ : active/