diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-06 14:45:51 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-06 14:45:51 -0800 |
commit | 77143b6128b1dabb4dd0d508076e2cb0baa714f9 (patch) | |
tree | 64327a9fad0b5e4e522652feb6c57779e40f7523 | |
parent | 67f77fec4af5b8cfabd70ecbc177b71df4bdc7f8 (diff) | |
download | ohai-77143b6128b1dabb4dd0d508076e2cb0baa714f9.tar.gz |
fix network listeners plugin
need to require 'sigar' early so that it blows up during the
definition rather than execution with a LoadError (is this a bug in
ohai core? this feels like a hack). also drop hpux and aix
specificity, not sure why that got added.
-rw-r--r-- | lib/ohai/plugins/network_listeners.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ohai/plugins/network_listeners.rb b/lib/ohai/plugins/network_listeners.rb index fcfcf0ba..ee86e3a6 100644 --- a/lib/ohai/plugins/network_listeners.rb +++ b/lib/ohai/plugins/network_listeners.rb @@ -16,12 +16,14 @@ # limitations under the License. # +require 'sigar' + Ohai.plugin(:NetworkListeners) do provides "network/listeners" depends "network", "counters/network" - collect_data(:aix, :hpux, :sigar) do + collect_data(:sigar) do require 'sigar' flags = Sigar::NETCONN_TCP|Sigar::NETCONN_SERVER |