summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-01-06 14:45:51 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2014-01-06 14:45:51 -0800
commit77143b6128b1dabb4dd0d508076e2cb0baa714f9 (patch)
tree64327a9fad0b5e4e522652feb6c57779e40f7523
parent67f77fec4af5b8cfabd70ecbc177b71df4bdc7f8 (diff)
downloadohai-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.rb4
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