diff options
author | dheerajd-msys <dheeraj.dubey@msystechnologies.com> | 2019-08-06 11:14:34 +0530 |
---|---|---|
committer | dheerajd-msys <dheeraj.dubey@msystechnologies.com> | 2019-08-07 11:28:30 +0530 |
commit | ac30d1b2423a992e433a4ba2b167be399754c147 (patch) | |
tree | 96da40ba90136ee0870bb5173bf4fe1434ab95fb /lib/chef/provider/ifconfig.rb | |
parent | 2ea154bae21b19e32b12a699b33844d7825fd2ab (diff) | |
download | chef-ac30d1b2423a992e433a4ba2b167be399754c147.tar.gz |
fix review comments
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
Diffstat (limited to 'lib/chef/provider/ifconfig.rb')
-rw-r--r-- | lib/chef/provider/ifconfig.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/provider/ifconfig.rb b/lib/chef/provider/ifconfig.rb index a3b63a5490..1334b16fe6 100644 --- a/lib/chef/provider/ifconfig.rb +++ b/lib/chef/provider/ifconfig.rb @@ -109,9 +109,11 @@ class Chef # RX errors 0 dropped 0 overruns 0 frame 0 # TX packets 1244218 bytes 977339327 (932.0 MiB) # TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 + # + # Permalink for addr_regex : https://rubular.com/r/JrykUpfjRnYeQD @status = shell_out("ifconfig") @status.stdout.each_line do |line| - addr_regex = /^(\w+)(-?):?(\d*):?\ .+$/ + addr_regex = /^((\w|-)+):?(\d*):?\ .+$/ if line =~ addr_regex if line.match(addr_regex).nil? @int_name = "nil" |