Sha256: 2130713d97c07fe885e6e273a6230a074d6d39fdf4beb33b4a53e89505f2cff5

Contents?: true

Size: 754 Bytes

Versions: 83

Compression:

Stored size: 754 Bytes

Contents

require 'facter/util/operatingsystem'
require 'facter/operatingsystem/linux'

module Facter
  module Operatingsystem
    class OsReleaseLinux < Linux
      def get_operatingsystem
        # Native cfacter also uses the NAME field.
        Facter::Util::Operatingsystem.os_release['NAME']
      end

      def get_osfamily
        Facter::Util::Operatingsystem.os_release['NAME']
      end

      def get_operatingsystemrelease
        @operatingsystemrelease ||= Facter::Util::Operatingsystem.os_release['VERSION_ID']
        @operatingsystemrelease
      end

      def get_operatingsystemmajrelease
        if operatingsystemrelease = get_operatingsystemrelease
          operatingsystemrelease.split(".").first
        end
      end
    end
  end
end

Version data entries

83 entries across 83 versions & 2 rubygems

Version Path
facter-2.5.7 lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.7-x86-mingw32 lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.7-x64-mingw32 lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.7-universal-darwin lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.6-x86-mingw32 lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.6-x64-mingw32 lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.6-universal-darwin lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.6 lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.5-x86-mingw32 lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.5-x64-mingw32 lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.5-universal-darwin lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.5 lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.4-x86-mingw32 lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.4-x64-mingw32 lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.4-universal-darwin lib/facter/operatingsystem/osreleaselinux.rb
facter-2.5.4 lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.24.0 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.23.0 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.22.0 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.21.8 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb