class Facter::Resolvers::Openbsd::DmiBios
Constants
- CTL_HW
- HW_PRODUCT
- HW_SERIALNO
- HW_UUID
- HW_VENDOR
- HW_VERSION
Private Class Methods
post_resolve(fact_name, _options)
click to toggle source
# File lib/facter/resolvers/openbsd/dmi.rb, line 12 def post_resolve(fact_name, _options) @fact_list.fetch(fact_name) { read_facts(fact_name) } end
read_facts(fact_name)
click to toggle source
# File lib/facter/resolvers/openbsd/dmi.rb, line 23 def read_facts(fact_name) require 'facter/resolvers/bsd/ffi/ffi_helper' @fact_list[:bios_vendor] = Facter::Bsd::FfiHelper.sysctl(:string, [CTL_HW, HW_VENDOR]) @fact_list[:bios_version] = Facter::Bsd::FfiHelper.sysctl(:string, [CTL_HW, HW_VERSION]) @fact_list[:product_name] = Facter::Bsd::FfiHelper.sysctl(:string, [CTL_HW, HW_PRODUCT]) @fact_list[:product_serial] = Facter::Bsd::FfiHelper.sysctl(:string, [CTL_HW, HW_SERIALNO]) @fact_list[:product_uuid] = Facter::Bsd::FfiHelper.sysctl(:string, [CTL_HW, HW_UUID]) @fact_list[:sys_vendor] = Facter::Bsd::FfiHelper.sysctl(:string, [CTL_HW, HW_VENDOR]) @fact_list[fact_name] end