diff options
author | Theodore Nordsieck <theo@opscode.com> | 2013-09-06 23:28:44 -0700 |
---|---|---|
committer | Theodore Nordsieck <theo@opscode.com> | 2013-09-11 16:13:22 -0700 |
commit | 7b07492c567c92676a740c2c77948f6c84e833c4 (patch) | |
tree | 4536028b17a2fc0c5461c01fc09f05c9b7973004 /lib/ohai/plugins/darwin/system_profiler.rb | |
parent | ef5f52821ea7d6eed2e9c0b213ee866766194ccd (diff) | |
download | ohai-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.rb | 8 |
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 |