diff options
author | Tim Smith <tsmith@chef.io> | 2020-11-17 17:12:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 17:12:14 -0800 |
commit | cf33a818b955fd937fe32b5b1b89c3ac7c35189d (patch) | |
tree | 17230e2ae7e0270c47723b63e646b3a11f43c9ec | |
parent | 7ab7562271acbd4c6b310fbcaf001ae99f4c0272 (diff) | |
download | ohai-aix.tar.gz |
Update lib/ohai/plugins/aix/network.rb
aix
Signed-off-by: Tim Smith <tsmith@chef.io>
Co-authored-by: pete higgins <pete@peterhiggins.org>
-rw-r--r-- | lib/ohai/plugins/aix/network.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/ohai/plugins/aix/network.rb b/lib/ohai/plugins/aix/network.rb index 52e419e3..a0555cce 100644 --- a/lib/ohai/plugins/aix/network.rb +++ b/lib/ohai/plugins/aix/network.rb @@ -47,9 +47,7 @@ Ohai.plugin(:Network) do # minutia such as default gateway/route. lpars return 0 here. wpars return > 0 unless shell_out("uname -W").stdout.to_i > 0 # :default_interface, :default_gateway - route -n get 0 - netstat_so = shell_out("netstat -rn").stdout - netstat_so.each_line do |line| - next unless line.start_with?("default") + line = shell_out("netstat -rn").stdout.each_line.detect { |l| l.start_with?("default") } items = line.split(" ") network[:default_gateway] = items[1] |