From: Peter Palfrader Date: Fri, 25 Nov 2016 13:59:18 +0000 (+0000) Subject: Add an apache2 factoid for backported from stretch apache X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=dcf8adb524f11d8196b0b0fe14b251511608f6a7;p=mirror%2Fdsa-puppet.git Add an apache2 factoid for backported from stretch apache --- diff --git a/modules/debian-org/lib/facter/software.rb b/modules/debian-org/lib/facter/software.rb index ba4c1be38..ca21dc031 100644 --- a/modules/debian-org/lib/facter/software.rb +++ b/modules/debian-org/lib/facter/software.rb @@ -7,6 +7,16 @@ Facter.add("apache2") do end end end +Facter.add("apache2deb9") do + setcode do + # jessie (deb8) has 2.4.10-.., stretch (deb9) will have 2.4.23 or later. + if FileTest.exist?("/usr/sbin/apache2") and system("dpkg --compare-versions $(dpkg-query -W -f='${Version}\n' apache2-bin) gt 2.4.15") + true + else + '' + end + end +end Facter.add("clamd") do setcode do if FileTest.exist?("/usr/sbin/clamd")