Merge branch 'master' of git+ssh://puppet.debian.org/srv/puppet.debian.org/git/dsa...
[mirror/dsa-puppet.git] / modules / debian-org / lib / facter / software.rb
index 3a0fefc..598d7a1 100644 (file)
@@ -28,6 +28,16 @@ Facter.add("postgres83") do
                FileTest.exist?("/usr/lib/postgresql/8.3/bin/postgres")
        end
 end
+Facter.add("postgres84") do
+       setcode do
+               FileTest.exist?("/usr/lib/postgresql/8.4/bin/postgres")
+       end
+end
+Facter.add("postgres90") do
+       setcode do
+               FileTest.exist?("/usr/lib/postgresql/9.0/bin/postgres")
+       end
+end
 Facter.add("postgrey") do
        setcode do
                FileTest.exist?("/usr/sbin/postgrey")
@@ -69,7 +79,7 @@ Facter.add("php5suhosin") do
 end
 Facter.add("syslogversion") do
        setcode do
-               %x{dpkg-query -W -f='${Version}\n' syslog-ng | cut -b1}.chomp
+               %x{dpkg-query -W -f='${Version}\n' syslog-ng | cut -b1-3}.chomp
        end
 end
 Facter.add("rsyncd") do
@@ -77,3 +87,9 @@ Facter.add("rsyncd") do
                FileTest.exist?("/etc/rsyncd.conf")
        end
 end
+Facter.add("unbound") do
+       setcode do
+               FileTest.exist?("/usr/sbin/unbound") and
+               FileTest.exist?("/var/lib/unbound/root.key")
+       end
+end