X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=facts%2Fsoftware.rb;h=e622d35d1fc6d5d87c01543fc266fdde9ad2531e;hb=d39e6c5e5fe3301b679fa93b8ae1141f66c54884;hp=fc922bb2bd1a6c01bcf88ea6db0653a14256a85b;hpb=aeb9f273e726e45454bd3bfc9430abba90216130;p=mirror%2Fdsa-puppet.git diff --git a/facts/software.rb b/facts/software.rb index fc922bb2b..e622d35d1 100644 --- a/facts/software.rb +++ b/facts/software.rb @@ -38,8 +38,37 @@ Facter.add("greylistd") do FileTest.exist?("/usr/sbin/greylistd") end end -Facter.add("policyd-weight") do +Facter.add("policydweight") do setcode 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