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:
39628d1
)
(over?)simplify the test for a smartarray controller
author
Stephen Gran
<steve@lobefin.net>
Wed, 5 Aug 2009 21:51:33 +0000
(22:51 +0100)
committer
Stephen Gran
<steve@lobefin.net>
Wed, 5 Aug 2009 21:51:33 +0000
(22:51 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
facts/raidarray.rb
patch
|
blob
|
history
diff --git
a/facts/raidarray.rb
b/facts/raidarray.rb
index
31d5b79
..
2e8773b
100644
(file)
--- a/
facts/raidarray.rb
+++ b/
facts/raidarray.rb
@@
-1,14
+1,7
@@
Facter.add("smartarraycontroller") do
confine :kernel => :linux
- ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
setcode do
- ishp = "false"
- if ((FileTest.executable?("/usr/bin/lspci")) && (FileTest.exist?("/proc/bus/pci")))
- %x{lspci}.each { |s|
- ishp = "true" if s =~ /RAID bus controller: (.*) Smart Array/
- }
- end
- ishp == "true"
+ FileTest.exist?("/dev/cciss/")
end
end