diff options
Diffstat (limited to 'lib/ohai/plugins/windows/network.rb')
-rw-r--r-- | lib/ohai/plugins/windows/network.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ohai/plugins/windows/network.rb b/lib/ohai/plugins/windows/network.rb index a81a1644..68e08060 100644 --- a/lib/ohai/plugins/windows/network.rb +++ b/lib/ohai/plugins/windows/network.rb @@ -120,13 +120,13 @@ Ohai.plugin(:Network) do iface_config = Mash.new iface_instance = Mash.new network Mash.new unless network - network[:interfaces] = Mash.new unless network[:interfaces] + network[:interfaces] ||= Mash.new counters Mash.new unless counters - counters[:network] = Mash.new unless counters[:network] + counters[:network] ||= Mash.new network_data[:addresses].each do |adapter| i = adapter["index"] || adapter["InterfaceIndex"] - iface_config[i] = Mash.new unless iface_config[i] + iface_config[i] ||= Mash.new iface_config[i][:ip_address] ||= [] iface_config[i][:ip_address] << adapter["IPAddress"] |