mips-aql-02: no/broken RTC
[mirror/dsa-puppet.git] / modules / debian-org / lib / facter / software.rb
index de30d49..0843c25 100644 (file)
@@ -34,36 +34,15 @@ Facter.add("postfix") do
                end
        end
 end
-Facter.add("postgres81") do
-       setcode do
-               if FileTest.exist?("/usr/lib/postgresql/8.1/bin/postgres")
-                       true
-               else
-                       ''
-               end
-       end
-end
-Facter.add("postgres83") do
-       setcode do
-               if FileTest.exist?("/usr/lib/postgresql/8.3/bin/postgres")
-                       true
-               else
-                       ''
-               end
-       end
-end
-Facter.add("postgres84") do
-       setcode do
-               if FileTest.exist?("/usr/lib/postgresql/8.4/bin/postgres")
-                       true
-               else
-                       ''
-               end
-       end
-end
-Facter.add("postgres90") do
-       setcode do
-               if FileTest.exist?("/usr/lib/postgresql/9.0/bin/postgres")
+Facter.add("postgres") do
+       setcode do
+               pg = (FileTest.exist?("/usr/lib/postgresql/8.1/bin/postgres") or
+               FileTest.exist?("/usr/lib/postgresql/8.3/bin/postgres") or
+               FileTest.exist?("/usr/lib/postgresql/8.4/bin/postgres") or
+               FileTest.exist?("/usr/lib/postgresql/9.0/bin/postgres") or
+               FileTest.exist?("/usr/lib/postgresql/9.1/bin/postgres") or
+               FileTest.exist?("/usr/lib/postgresql/9.2/bin/postgres"))
+               if pg
                        true
                else
                        ''
@@ -142,8 +121,17 @@ Facter.add("unbound") do
                end
        end
 end
-Facter.add("munin-async") do
+Facter.add("munin_async") do
        setcode do
                FileTest.exist?("/usr/share/munin/munin-async")
        end
 end
+Facter.add("samhain") do
+       setcode do
+               if FileTest.exist?("/usr/sbin/samhain")
+                       true
+               else
+                       ''
+               end
+       end
+end