Edit

IABSD.fr/ports/sysutils/ruby-facter/patches/patch-lib_facter_partitions_rb

Branch :

  • Show log

    Commit

  • Author : jasper
    Date : 2015-09-01 07:23:35
    Hash : 10832e75
    Message : rework the df/mount caching so it can be flushed if needed

  • sysutils/ruby-facter/patches/patch-lib_facter_partitions_rb
  • $OpenBSD: patch-lib_facter_partitions_rb,v 1.4 2015/09/01 07:23:35 jasper Exp $
    
    Cache df/mount output to prevent running these programs 3 times for every partition found.
    https://github.com/puppetlabs/facter/pull/1119
    
    --- lib/facter/partitions.rb.orig	Mon Aug 31 19:03:25 2015
    +++ lib/facter/partitions.rb	Mon Aug 31 19:03:35 2015
    @@ -36,4 +36,7 @@ Facter.add(:partitions) do
         end
         partitions
       end
    +  on_flush do
    +    Facter::Util::Partitions.flush! if Facter::Util::Partitions.flushable?
    +  end
     end