opscode/ohai — pull request #319 by viyh (2014-04-21 06:20:32+00:00)
Title: [OHAI-572] Fix warning message about constants already defined

As decribed in my ticket, I started getting a couple of warnings after upgrading to the latest version of chef/ohai:

-snip-

Recipe: ohai::default
ohai[custom_plugins] action reload
/usr/local/share/ruby/gems/2.0/gems/ohai-7.0.2/lib/ohai/plugins/linux/network.rb:49: warning: already initialized constant IPROUTE_INT_REGEX
/usr/local/share/ruby/gems/2.0/gems/ohai-7.0.2/lib/ohai/plugins/linux/network.rb:49: warning: previous definition of IPROUTE_INT_REGEX was here

-snip-

I've added a simple check to see if the constant was previously defined.