patch-lib_facter_partitions_rb 513 B

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