summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2018-04-23 13:45:01 +0100
committerThom May <thom@chef.io>2018-04-23 13:45:01 +0100
commit708e8e084bd715e2dd6e25f0157a5e081691fa55 (patch)
treea1a149a58ff52abca452369f0990ae18a208bf74 /lib/chef
parentf3698119a48d4706bccd4767f3c50f0820f9ae5c (diff)
downloadchef-708e8e084bd715e2dd6e25f0157a5e081691fa55.tar.gz
begin fix up of ifconfig provider on 1804
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/provider/ifconfig/debian.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/provider/ifconfig/debian.rb b/lib/chef/provider/ifconfig/debian.rb
index e1e978fdde..aee3ca02dc 100644
--- a/lib/chef/provider/ifconfig/debian.rb
+++ b/lib/chef/provider/ifconfig/debian.rb
@@ -62,6 +62,8 @@ iface <%= new_resource.device %> <%= new_resource.family %> static
protected
def enforce_interfaces_dot_d_sanity
+ # on ubuntu 18.04 there's no interfaces file and it uses interfaces.d by default
+ return if ::File.directory?(INTERFACES_DOT_D_DIR) && !::File.exist?(INTERFACES_FILE)
# create /etc/network/interfaces.d via dir resource (to get reporting, etc)
dir = Chef::Resource::Directory.new(INTERFACES_DOT_D_DIR, run_context)
dir.run_action(:create)