diff options
author | Theodore Nordsieck <theo@opscode.com> | 2013-09-10 09:04:06 -0700 |
---|---|---|
committer | Theodore Nordsieck <theo@opscode.com> | 2013-09-11 16:13:24 -0700 |
commit | 9dade273349efd4d4d5cd72e4f44b63671b4df50 (patch) | |
tree | 8b845ca297e438955eebfe31e7b0dabe6723a3f5 | |
parent | 66af6fd4046e3f341cf6ee54a290accd66983fb0 (diff) | |
download | ohai-9dade273349efd4d4d5cd72e4f44b63671b4df50.tar.gz |
Converted plugins/freebsd/cpu to Mixlib::ShellOut.
-rw-r--r-- | lib/ohai/plugins/freebsd/cpu.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ohai/plugins/freebsd/cpu.rb b/lib/ohai/plugins/freebsd/cpu.rb index 4f867756..7512c042 100644 --- a/lib/ohai/plugins/freebsd/cpu.rb +++ b/lib/ohai/plugins/freebsd/cpu.rb @@ -51,6 +51,7 @@ Ohai.plugin do end cpu cpuinfo - cpu[:total] = from("sysctl -n hw.ncpu") + so = shell_out("sysctl -n hw.ncpu") + cpu[:total] = so.stdout.split($/)[0] end end |