X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=facts%2Fsoftware.rb;h=3a0fefcd0064f52200e669573e0c5ec2df2d981d;hb=1fa867119985fcfde6ad93af165dd274afc48feb;hp=233acc57a03207cb21607fa75a78470e09cc5bde;hpb=1b947e1b4adc7ac3397867acd18054e8e4023011;p=mirror%2Fdsa-puppet.git diff --git a/facts/software.rb b/facts/software.rb index 233acc57a..3a0fefcd0 100644 --- a/facts/software.rb +++ b/facts/software.rb @@ -48,3 +48,32 @@ Facter.add("vsftpd") 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