X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=facts%2Fsoftware.rb;h=3a0fefcd0064f52200e669573e0c5ec2df2d981d;hb=1fa867119985fcfde6ad93af165dd274afc48feb;hp=fed40d8acfbe31966802eaf9dc1d858ed97961db;hpb=74f7a7a40aae37e799f2b436d45f2b5ee76ac5d2;p=mirror%2Fdsa-puppet.git diff --git a/facts/software.rb b/facts/software.rb index fed40d8ac..3a0fefcd0 100644 --- a/facts/software.rb +++ b/facts/software.rb @@ -43,3 +43,37 @@ Facter.add("policydweight") do FileTest.exist?("/usr/sbin/policyd-weight") end end +Facter.add("vsftpd") do + setcode do + FileTest.exist?("/usr/sbin/vsftpd") + end +end +Facter.add("spamd") do + setcode do + FileTest.exist?("/usr/sbin/spamd") + end +end +Facter.add("php5") do + setcode do + 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") + end +end +Facter.add("php5suhosin") do + setcode do + FileTest.exist?("/usr/lib/php5/20060613/suhosin.so") or + FileTest.exist?("/usr/lib/php5/20060613+lfs/suhosin.so") + end +end +Facter.add("syslogversion") do + setcode do + %x{dpkg-query -W -f='${Version}\n' syslog-ng | cut -b1}.chomp + end +end +Facter.add("rsyncd") do + setcode do + FileTest.exist?("/etc/rsyncd.conf") + end +end