diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-07-08 22:34:35 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-07-08 22:34:35 -0700 |
commit | ff3e108b04bc1617462a0b76b282253f116920f2 (patch) | |
tree | 248c3f1c83d6d937bde001bca0c073123c7959df | |
parent | 8f717cec19e901a7c42d3d7da7203cdf53150e56 (diff) | |
download | ohai-ff3e108b04bc1617462a0b76b282253f116920f2.tar.gz |
fix newlines in platform/platform_family
follows the pattern used by all the other plugins to strip off
the newlines (not sure why we don't just use .chomp, but i'm being
consistent with all the rest of the code)
-rw-r--r-- | lib/ohai/plugins/aix/kernel.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ohai/plugins/aix/kernel.rb b/lib/ohai/plugins/aix/kernel.rb index b8ce0acf..91fb58cd 100644 --- a/lib/ohai/plugins/aix/kernel.rb +++ b/lib/ohai/plugins/aix/kernel.rb @@ -22,10 +22,10 @@ Ohai.plugin(:Kernel) do collect_data(:aix) do kernel Mash.new - kernel[:name] = shell_out("uname -s").stdout.downcase - kernel[:release] = shell_out("uname -r").stdout - kernel[:version] = shell_out("uname -v").stdout - kernel[:machine] = shell_out("uname -p").stdout + kernel[:name] = shell_out("uname -s").stdout.split($/)[0].downcase + kernel[:release] = shell_out("uname -r").stdout.split($/)[0] + kernel[:version] = shell_out("uname -v").stdout.split($/)[0] + kernel[:machine] = shell_out("uname -p").stdout.split($/)[0] kernel[:modules] = Mash.new end end |