From: Paul Wise Date: Sun, 21 Jun 2015 09:15:50 +0000 (+0800) Subject: Attempt to make puppet quiet on falla X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=a82772daaacb48fa7d88ef1d1216c731bdc15187;p=mirror%2Fdsa-puppet.git Attempt to make puppet quiet on falla --- diff --git a/modules/debian-org/lib/facter/lsb-for-bsd.rb b/modules/debian-org/lib/facter/lsb-for-bsd.rb index 09fd3702d..c95d7f2eb 100644 --- a/modules/debian-org/lib/facter/lsb-for-bsd.rb +++ b/modules/debian-org/lib/facter/lsb-for-bsd.rb @@ -7,13 +7,13 @@ Facter.add(fact) do confine :kernel => 'GNU/kFreeBSD' setcode do - unless defined?(@@lsbdata) and defined?(@@lsbtime) and (Time.now.to_i - @@lsbtime.to_i < 5) + unless defined?(lsbdata) and defined?(lsbtime) and (Time.now.to_i - lsbtime.to_i < 5) type = nil - @@lsbtime = Time.now - @@lsbdata = Facter::Util::Resolution.exec('lsb_release -a 2>/dev/null') + lsbtime = Time.now + lsbdata = Facter::Util::Resolution.exec('lsb_release -a 2>/dev/null') end - if pattern.match(@@lsbdata) + if pattern.match(lsbdata) $1 else nil