Sha256: f26b50e79a8fac278aaeec15ff466b5817addfb6ec6f4711828f58669c0b0e20

Contents?: true

Size: 503 Bytes

Versions: 102

Compression:

Stored size: 503 Bytes

Contents

# Fact: kernelversion
#
# Purpose: Return the operating system's kernel version.
#
# Resolution:
#   On Solaris and SunOS based machines, returns the output of `uname -v`.
#   Otherwise returns the kernerlversion fact up to the first `-`. This may be
#   the entire kernelversion fact in many cases.
#
# Caveats:
#

Facter.add("kernelversion") do
  setcode do
    Facter['kernelrelease'].value.split('-')[0]
  end
end

Facter.add("kernelversion") do
  confine :kernel => :sunos
  setcode 'uname -v'
end

Version data entries

102 entries across 102 versions & 3 rubygems

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