diff options
author | dheerajd-msys <dheeraj.dubey@msystechnologies.com> | 2019-08-06 11:14:34 +0530 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2019-10-09 10:48:08 -0700 |
commit | d5774afabda0f09df359d0126617358e51f8349e (patch) | |
tree | a7d17f5a4758a80b837746d92dd9624b796bdb6e | |
parent | 892a1721b3cbaa8067b8b3beb3ac6adf5fcbc027 (diff) | |
download | chef-d5774afabda0f09df359d0126617358e51f8349e.tar.gz |
fix review comments
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
-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 0c7b9f1f5a..1575127c25 100644 --- a/lib/chef/provider/ifconfig.rb +++ b/lib/chef/provider/ifconfig.rb @@ -108,9 +108,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" |