Module: Facter::Operatingsystem
- Defined in:
- lib/facter/operatingsystem/base.rb,
lib/facter/operatingsystem/linux.rb,
lib/facter/operatingsystem/sunos.rb,
lib/facter/operatingsystem/windows.rb,
lib/facter/operatingsystem/vmkernel.rb,
lib/facter/operatingsystem/cumuluslinux.rb,
lib/facter/operatingsystem/implementation.rb
Defined Under Namespace
Classes: Base, CumulusLinux, Linux, SunOS, VMkernel, Windows
Class Method Summary collapse
Class Method Details
.implementation(kernel = Facter.value(:kernel)) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/facter/operatingsystem/implementation.rb', line 10 def self.implementation(kernel = Facter.value(:kernel)) case kernel when "Linux", "GNU/kFreeBSD" release_info = Facter::Util::Operatingsystem.os_release if release_info['NAME'] == "Cumulus Linux" Facter::Operatingsystem::CumulusLinux.new else Facter::Operatingsystem::Linux.new end when "SunOS" Facter::Operatingsystem::SunOS.new when "VMkernel" Facter::Operatingsystem::VMkernel.new when "windows" Facter::Operatingsystem::Windows.new else Facter::Operatingsystem::Base.new end end |