diff options
author | Thom May <thom@chef.io> | 2018-04-23 13:45:01 +0100 |
---|---|---|
committer | Thom May <thom@chef.io> | 2018-04-23 13:45:01 +0100 |
commit | 708e8e084bd715e2dd6e25f0157a5e081691fa55 (patch) | |
tree | a1a149a58ff52abca452369f0990ae18a208bf74 /spec/functional/resource | |
parent | f3698119a48d4706bccd4767f3c50f0820f9ae5c (diff) | |
download | chef-708e8e084bd715e2dd6e25f0157a5e081691fa55.tar.gz |
begin fix up of ifconfig provider on 1804
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'spec/functional/resource')
-rw-r--r-- | spec/functional/resource/ifconfig_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/functional/resource/ifconfig_spec.rb b/spec/functional/resource/ifconfig_spec.rb index fbb8995d52..f32ed069b5 100644 --- a/spec/functional/resource/ifconfig_spec.rb +++ b/spec/functional/resource/ifconfig_spec.rb @@ -16,6 +16,7 @@ # limitations under the License. # +require "spec_helper" require "functional/resource/base" require "chef/mixin/shell_out" @@ -52,7 +53,7 @@ describe Chef::Resource::Ifconfig, :requires_root, :skip_travis, :external => in end def fetch_first_interface_name - shell_out("ifconfig | grep Ethernet | head -1 | cut -d' ' -f1").stdout.strip + shell_out("ip link list |grep UP|grep -vi loop|head -1|cut -d':' -f 2").stdout.strip end # **Caution: any updates to core interfaces can be risky. |