module Ohai::Mixin::OS
Public Class Methods
collect_os()
click to toggle source
# File lib/ohai/mixin/os.rb, line 26 def collect_os case ::RbConfig::CONFIG['host_os'] when /aix(.+)$/ return "aix" when /darwin(.+)$/ return "darwin" when /hpux(.+)$/ return "hpux" when /linux/ return "linux" when /freebsd(.+)$/ return "freebsd" when /openbsd(.+)$/ return "openbsd" when /netbsd(.*)$/ return "netbsd" when /solaris2/ return "solaris2" when /mswin|mingw32|windows/ # After long discussion in IRC the "powers that be" have come to a consensus # that no Windows platform exists that was not based on the # Windows_NT kernel, so we herby decree that "windows" will refer to all # platforms built upon the Windows_NT kernel and have access to win32 or win64 # subsystems. return "windows" else return ::RbConfig::CONFIG['host_os'] end end
Private Instance Methods
collect_os()
click to toggle source
# File lib/ohai/mixin/os.rb, line 26 def collect_os case ::RbConfig::CONFIG['host_os'] when /aix(.+)$/ return "aix" when /darwin(.+)$/ return "darwin" when /hpux(.+)$/ return "hpux" when /linux/ return "linux" when /freebsd(.+)$/ return "freebsd" when /openbsd(.+)$/ return "openbsd" when /netbsd(.*)$/ return "netbsd" when /solaris2/ return "solaris2" when /mswin|mingw32|windows/ # After long discussion in IRC the "powers that be" have come to a consensus # that no Windows platform exists that was not based on the # Windows_NT kernel, so we herby decree that "windows" will refer to all # platforms built upon the Windows_NT kernel and have access to win32 or win64 # subsystems. return "windows" else return ::RbConfig::CONFIG['host_os'] end end