X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=facts%2Fsoftware.rb;h=e622d35d1fc6d5d87c01543fc266fdde9ad2531e;hb=30a4c3a5d8132367ea65dcbae94f5d3f2e364833;hp=f7f7abc4e5de5f297340be5f1664ffb3af2c9c47;hpb=96f38cb57f542dd3d83e9b0b7bf201e3ec23f2d3;p=mirror%2Fdsa-puppet.git diff --git a/facts/software.rb b/facts/software.rb index f7f7abc4e..e622d35d1 100644 --- a/facts/software.rb +++ b/facts/software.rb @@ -53,3 +53,22 @@ Facter.add("spamd") 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