HEX
Server: Apache
System: Linux shared178.accountservergroup.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User: somesolu (2995)
PHP: 8.2.33
Disabled: NONE
Upload Files
File: //usr/share/ruby/vendor_ruby/facter/util/partitions.rb
require 'facter/util/partitions/linux'
require 'facter/util/partitions/openbsd'

module Facter::Util::Partitions
  IMPLEMENTATIONS = {
    'Linux'   => Linux,
    'OpenBSD' => OpenBSD,
  }

  module NoImplementation
    def self.list
      []
    end
  end

  def self.implementation
    IMPLEMENTATIONS[Facter.fact(:kernel).value] || NoImplementation
  end

  def self.list
    implementation.list
  end

  def self.uuid(partition)
    implementation.uuid(partition)
  end

  def self.size(partition)
    implementation.size(partition)
  end

  def self.mount(partition)
    implementation.mount(partition)
  end

  def self.filesystem(partition)
    implementation.filesystem(partition)
  end

  def self.label(partition)
    implementation.label(partition)
  end

  def self.available?
    !self.list.empty?
  end
end