summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ohai/plugins/solaris2/dmi.rb2
-rw-r--r--lib/ohai/plugins/solaris2/network.rb4
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/ohai/plugins/solaris2/dmi.rb b/lib/ohai/plugins/solaris2/dmi.rb
index 806dd1f6..7d98c06d 100644
--- a/lib/ohai/plugins/solaris2/dmi.rb
+++ b/lib/ohai/plugins/solaris2/dmi.rb
@@ -86,7 +86,7 @@ Ohai.plugin(:DMI) do
"SUN_OEM_EXT_MEMARRAY" => 144, # phys memory array extended info
"SUN_OEM_EXT_MEMDEVICE" => 145, # memory device extended info
"SMB_TYPE_OEM_HI" => 256, # end of OEM-specific type range
- }
+ }.freeze
# all output lines should fall within one of these patterns
header_type_line = /^ID\s+SIZE\s+TYPE/
diff --git a/lib/ohai/plugins/solaris2/network.rb b/lib/ohai/plugins/solaris2/network.rb
index d2a9e7e7..1c7ff0f1 100644
--- a/lib/ohai/plugins/solaris2/network.rb
+++ b/lib/ohai/plugins/solaris2/network.rb
@@ -54,13 +54,11 @@
# inet6 fe80::203:baff:fe17:4444/128
# Extracted from http://illumos.org/hcl/
-unless defined?(ETHERNET_ENCAPS)
- ETHERNET_ENCAPS = %w{ afe amd8111s arn atge ath bfe bge bnx bnxe ce cxgbe
+ETHERNET_ENCAPS ||= %w{ afe amd8111s arn atge ath bfe bge bnx bnxe ce cxgbe
dmfe e1000g efe elxl emlxs eri hermon hme hxge igb
iprb ipw iwh iwi iwk iwp ixgb ixgbe mwl mxfe myri10ge
nge ntxn nxge pcn platform qfe qlc ral rge rtls rtw rwd
rwn sfe tavor vr wpi xge yge aggr}.freeze
-end
Ohai.plugin(:Network) do
require_relative "../../mixin/network_helper"