Sha256: dba90e16a2afff6edf046932154bdf45257aac5d41be692d86cfb0b4cd567af0

Contents?: true

Size: 686 Bytes

Versions: 4

Compression:

Stored size: 686 Bytes

Contents

# frozen_string_literal: true

module Facter
  module Resolvers
    module Macosx
      class Filesystems < BaseResolver
        # :macosx_filesystems
        init_resolver

        class << self
          private

          def post_resolve(fact_name)
            @fact_list.fetch(fact_name) { read_filesystems(fact_name) }
          end

          def read_filesystems(fact_name)
            output = Facter::Core::Execution.execute('mount', logger: log)
            filesystems = output.scan(/\(([a-z]+)\,*/).flatten
            @fact_list[:macosx_filesystems] = filesystems.uniq.sort.join(',')
            @fact_list[fact_name]
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facter-4.0.49 lib/facter/resolvers/macosx/filesystems.rb
facter-4.0.48 lib/facter/resolvers/macosx/filesystems.rb
facter-4.0.47 lib/facter/resolvers/macosx/filesystems_resolver.rb
facter-4.0.46 lib/facter/resolvers/macosx/filesystems_resolver.rb