projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13b7c9f
)
Add software raid test
author
Stephen Gran
<steve@lobefin.net>
Mon, 9 Mar 2009 19:26:44 +0000
(19:26 +0000)
committer
Stephen Gran
<steve@lobefin.net>
Mon, 9 Mar 2009 19:26:44 +0000
(19:26 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
facts/raidcontroller.rb
patch
|
blob
|
history
diff --git
a/facts/raidcontroller.rb
b/facts/raidcontroller.rb
index
f2834c2
..
263b16b
100644
(file)
--- a/
facts/raidcontroller.rb
+++ b/
facts/raidcontroller.rb
@@
-32,3
+32,17
@@
Facter.add("3warecontroller") do
is3w
end
end
+
+Facter.add("swraid") do
+ confine :kernel => :linux
+ setcode do
+ swraid = "false"
+ if FileTest.exist?("/proc/mdstat") && FileTest.exist?("/sbin/mdadm")
+ IO.foreach("/proc/mdstat") { |x|
+ swraid = "true" if x =~ /md[0-9]+ : active/
+ }
+ end
+ swraid
+ end
+end
+