Sha256: fc2e4479f33a913e67dc3b031d42606dab900bc2faafcd949a5633fca1d77e53

Contents?: true

Size: 507 Bytes

Versions: 75

Compression:

Stored size: 507 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

75 entries across 75 versions & 3 rubygems

Version Path
facter-2.1.0 lib/facter/kernelversion.rb
facter-2.1.0-x86-mingw32 lib/facter/kernelversion.rb
facter-2.1.0-x64-mingw32 lib/facter/kernelversion.rb
facter-2.1.0-universal-darwin lib/facter/kernelversion.rb
facter-1.7.6 lib/facter/kernelversion.rb
facter-2.0.2 lib/facter/kernelversion.rb
facter-2.0.2-x86-mingw32 lib/facter/kernelversion.rb
facter-2.0.2-universal-darwin lib/facter/kernelversion.rb
facter-2.0.1 lib/facter/kernelversion.rb
facter-2.0.1-x86-mingw32 lib/facter/kernelversion.rb
facter-2.0.1-universal-darwin lib/facter/kernelversion.rb
facter-2.0.1.rc4 lib/facter/kernelversion.rb
facter-2.0.1.rc4-x86-mingw32 lib/facter/kernelversion.rb
facter-2.0.1.rc4-universal-darwin lib/facter/kernelversion.rb
facter-2.0.1.rc3 lib/facter/kernelversion.rb
facter-2.0.1.rc3-x86-mingw32 lib/facter/kernelversion.rb
facter-2.0.1.rc3-universal-darwin lib/facter/kernelversion.rb
facter-2.0.1.rc2 lib/facter/kernelversion.rb
facter-2.0.1.rc2-x86-mingw32 lib/facter/kernelversion.rb
facter-2.0.1.rc2-universal-darwin lib/facter/kernelversion.rb