diff options
author | Tim Smith <tsmith@chef.io> | 2019-08-23 06:22:41 -0400 |
---|---|---|
committer | dheerajd-msys <dheeraj.dubey@msystechnologies.com> | 2020-02-27 14:29:31 +0530 |
commit | 07b6040ab2df749145651f9a91c567a0a8a59c45 (patch) | |
tree | d243dc8a75ca6806913169fa2f28837200a6720a | |
parent | a718989b9e0fefdaca9fdb8d46030e06da51c71f (diff) | |
download | chef-07b6040ab2df749145651f9a91c567a0a8a59c45.tar.gz |
Backport:ifconfig: fix regex matching interface name with hyphen
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
-rw-r--r-- | lib/chef/provider/ifconfig.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/ifconfig.rb b/lib/chef/provider/ifconfig.rb index 607f1fa47b..1575127c25 100644 --- a/lib/chef/provider/ifconfig.rb +++ b/lib/chef/provider/ifconfig.rb @@ -112,7 +112,7 @@ class Chef # 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" |