summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-07-11 11:48:37 -0700
committerGitHub <noreply@github.com>2019-07-11 11:48:37 -0700
commitadf17ccc6e9e5ed2860ee95d5e0df4cbae234bc0 (patch)
treef998767fa897466d66fea18fe015e68fec76558e
parentf5eed7c04a407b5ee138125000860b29325e1f21 (diff)
parentd65295f24995d8b41599990e1c3878120169bcda (diff)
downloadohai-adf17ccc6e9e5ed2860ee95d5e0df4cbae234bc0.tar.gz
Merge pull request #1382 from josephmilla/feature/make-state-regex-less-restrictive
Feature - Change regex for detecting interface's state
-rw-r--r--lib/ohai/plugins/linux/network.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ohai/plugins/linux/network.rb b/lib/ohai/plugins/linux/network.rb
index 9852413f..62f5dfd6 100644
--- a/lib/ohai/plugins/linux/network.rb
+++ b/lib/ohai/plugins/linux/network.rb
@@ -283,7 +283,8 @@ Ohai.plugin(:Network) do
end
end
- if line =~ /state (\w+)/
+ # https://rubular.com/r/JRp6lNANmpcLV5
+ if line =~ /\sstate (\w+)/
iface[tmp_int]["state"] = $1.downcase
end
end