summaryrefslogtreecommitdiff
path: root/lib/ohai/plugins/darwin/system_profiler.rb
diff options
context:
space:
mode:
authorTheodore Nordsieck <theo@opscode.com>2013-09-06 23:28:44 -0700
committerTheodore Nordsieck <theo@opscode.com>2013-09-11 16:13:22 -0700
commit7b07492c567c92676a740c2c77948f6c84e833c4 (patch)
tree4536028b17a2fc0c5461c01fc09f05c9b7973004 /lib/ohai/plugins/darwin/system_profiler.rb
parentef5f52821ea7d6eed2e9c0b213ee866766194ccd (diff)
downloadohai-7b07492c567c92676a740c2c77948f6c84e833c4.tar.gz
Converted plutins/darwin/system_profiler to Mixlib::ShellOut.
Diffstat (limited to 'lib/ohai/plugins/darwin/system_profiler.rb')
-rw-r--r--lib/ohai/plugins/darwin/system_profiler.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/ohai/plugins/darwin/system_profiler.rb b/lib/ohai/plugins/darwin/system_profiler.rb
index 86efcb71..5c364beb 100644
--- a/lib/ohai/plugins/darwin/system_profiler.rb
+++ b/lib/ohai/plugins/darwin/system_profiler.rb
@@ -59,11 +59,9 @@ Ohai.plugin do
}
detail_level.each do |level, data_types|
- popen4("system_profiler -xml -detailLevel #{level} #{data_types.join(' ')}") do |pid, stdin, stdout, stderr|
- stdin.close
- Plist::parse_xml(stdout.read).each do |e|
- items << e
- end
+ so = shell_out("system_profiler -xml -detailLevel #{level} #{data_types.join(' ')}")
+ Plist::parse_xml(so.stdout).each do |e|
+ items << e
end
end