# File lib/ohai/system.rb, line 115 def all_plugins require_plugin('os') Ohai::Config[:plugin_path].each do |path| [ Dir[File.join(path, '*')], Dir[File.join(path, @data[:os], '**', '*')] ].flatten.each do |file| file_regex = Regexp.new("#{path}#{File::SEPARATOR}(.+).rb$") md = file_regex.match(file) if md 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