diff options
author | Theodore Nordsieck <theo@opscode.com> | 2013-09-09 18:37:10 -0700 |
---|---|---|
committer | Theodore Nordsieck <theo@opscode.com> | 2013-09-11 16:13:23 -0700 |
commit | 0dc6fd8e5efd8efa9c341b2361e959808f1f283d (patch) | |
tree | 6141c81b28fc51114b1aaa0b8d5c9148ec8e52ea | |
parent | 343fe23894225aef10762af410d70bbf621ff38c (diff) | |
download | ohai-0dc6fd8e5efd8efa9c341b2361e959808f1f283d.tar.gz |
Converted plugins/netbsd/cpu to Mixlib::ShellOut.
-rw-r--r-- | lib/ohai/plugins/netbsd/cpu.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/ohai/plugins/netbsd/cpu.rb b/lib/ohai/plugins/netbsd/cpu.rb index 93deb76d..fbced143 100644 --- a/lib/ohai/plugins/netbsd/cpu.rb +++ b/lib/ohai/plugins/netbsd/cpu.rb @@ -36,12 +36,10 @@ Ohai.plugin do end flags = [] - popen4("dmidecode") do |pid, stdin, stdout, stderr| - stdin.close - stdout.each do |line| - if line =~ /^\s+([A-Z\d-]+)\s+\([\w\s-]+\)$/ - flags << $1.downcase - end + so = shell_out("dmidecode") + so.stdout.lines do |line| + if line =~ /^\s+([A-Z\d-]+)\s+\([\w\s-]+\)$/ + flags << $1.downcase end end |