Class: Facts::Openbsd::Os::Release
- Inherits:
-
Object
- Object
- Facts::Openbsd::Os::Release
- Defined in:
- lib/facter/facts/openbsd/os/release.rb
Constant Summary collapse
- FACT_NAME =
'os.release'
- ALIASES =
%w[operatingsystemmajrelease operatingsystemrelease].freeze
Instance Method Summary collapse
Instance Method Details
#call_the_resolver ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/facter/facts/openbsd/os/release.rb', line 10 def call_the_resolver # From Freebsd # Facter::ResolvedFact.new(ALIASES.last, installed_userland, :legacy)] version = Facter::Resolvers::Uname.resolve(:kernelrelease) major, minor = version.split('.') [Facter::ResolvedFact.new(FACT_NAME, full: version, major: major, minor: minor), Facter::ResolvedFact.new(ALIASES.first, major, :legacy), Facter::ResolvedFact.new(ALIASES.last, version, :legacy)] end |