Merge branch 'master' of ssh://handel.debian.org/srv/puppet.debian.org/git/dsa-puppet
authorPeter Palfrader <peter@palfrader.org>
Sun, 28 Feb 2010 16:00:27 +0000 (17:00 +0100)
committerPeter Palfrader <peter@palfrader.org>
Sun, 28 Feb 2010 16:00:27 +0000 (17:00 +0100)
* 'master' of ssh://handel.debian.org/srv/puppet.debian.org/git/dsa-puppet:
  add fact for megaraid controllers
  strip some of the randomness

facts/architecture.rb
facts/raidarray.rb

index f0d7ff5..894c82c 100644 (file)
@@ -13,7 +13,7 @@ end
 
 Facter.add(:debarchitecture) do
     setcode do
-        %x{/usr/bin/dpkg --print-architecture}
+        %x{/usr/bin/dpkg --print-architecture}.chomp
     end
 end
 
index acd46b8..61e48b6 100644 (file)
@@ -25,6 +25,13 @@ Facter.add("ThreeWarecontroller") do
        end
 end
 
+Facter.add("megaraid") do
+       confine :kernel => :linux
+       setcode do
+               FileTest.exist?("/dev/megadev0")
+       end
+end
+
 Facter.add("aacraid") do
        confine :kernel => :linux
        setcode do