X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fdebian-org%2Flib%2Ffacter%2Fsoftware.rb;h=533c77933cdfa9ef0a5ae6dda26c86c3578907f7;hb=3324fdc9fe51a4a7dc111f4be8611ce033f3649f;hp=2bcc0a63c2e65bdf38899122569eab11c477d0cc;hpb=5f554fd0f2eb0e958496e02de77143734453018b;p=mirror%2Fdsa-puppet.git diff --git a/modules/debian-org/lib/facter/software.rb b/modules/debian-org/lib/facter/software.rb index 2bcc0a63c..533c77933 100644 --- a/modules/debian-org/lib/facter/software.rb +++ b/modules/debian-org/lib/facter/software.rb @@ -103,10 +103,10 @@ Facter.add("spamd") do end end Facter.add("php5") do - php = FileTest.exist?("/usr/lib/apache2/modules/libphp5.so") or + php = (FileTest.exist?("/usr/lib/apache2/modules/libphp5.so") or FileTest.exist?("/usr/bin/php5") or FileTest.exist?("/usr/bin/php5-cgi") or - FileTest.exist?("/usr/lib/cgi-bin/php5") + FileTest.exist?("/usr/lib/cgi-bin/php5")) setcode do if php true @@ -116,8 +116,8 @@ Facter.add("php5") do end end Facter.add("php5suhosin") do - suhosin=FileTest.exist?("/usr/lib/php5/20060613/suhosin.so") or - FileTest.exist?("/usr/lib/php5/20060613+lfs/suhosin.so") + suhosin=(FileTest.exist?("/usr/lib/php5/20060613/suhosin.so") or + FileTest.exist?("/usr/lib/php5/20060613+lfs/suhosin.so")) setcode do if suhosin true @@ -131,23 +131,19 @@ Facter.add("syslogversion") do %x{dpkg-query -W -f='${Version}\n' syslog-ng | cut -b1-3}.chomp end end -Facter.add("rsyncd") do +Facter.add("unbound") do + unbound=(FileTest.exist?("/usr/sbin/unbound") and + FileTest.exist?("/var/lib/unbound/root.key")) setcode do - if FileTest.exist?("/etc/rsyncd.conf") + if unbound true else '' end end end -Facter.add("unbound") do - unbound=FileTest.exist?("/usr/sbin/unbound") and - FileTest.exist?("/var/lib/unbound/root.key") +Facter.add("munin_async") do setcode do - if unbound - true - else - '' - end + FileTest.exist?("/usr/share/munin/munin-async") end end