lib/ohai/system.rb in ohai-0.4.0 vs lib/ohai/system.rb in ohai-0.5.0

- old
+ new

@@ -126,10 +126,13 @@ plugin_name = md[1].gsub(File::SEPARATOR, "::") require_plugin(plugin_name) unless @seen_plugins.has_key?(plugin_name) end end end + # Catch any errant children who need to be reaped + Process.waitall + true end def collect_providers(providers) refreshments = [] if providers.is_a?(Mash) @@ -171,9 +174,14 @@ end def require_plugin(plugin_name, force=false) unless force return true if @seen_plugins[plugin_name] + end + + if Ohai::Config[:disabled_plugins].include?(plugin_name) + Ohai::Log.debug("Skipping disabled plugin #{plugin_name}") + return false end @plugin_path = plugin_name filename = "#{plugin_name.gsub("::", File::SEPARATOR)}.rb"