diff options
author | Thom May <thom@chef.io> | 2017-10-03 15:22:34 -0700 |
---|---|---|
committer | Thom May <thom@chef.io> | 2017-10-03 15:46:16 -0700 |
commit | 8d560b01fd5a3771aff67f3a5463e3e7e7e85b12 (patch) | |
tree | bc5a972bd2b606ae15dd80ffd1b124c7983b8f12 /lib/chef/provider | |
parent | 00e10b3fa2be1f572be207fcb3b1d3bdf135690e (diff) | |
download | chef-8d560b01fd5a3771aff67f3a5463e3e7e7e85b12.tar.gz |
[Route unit tests]: Ensure we go down the new file pathtm/route_tests
This should make us more robust in the face of the enemy
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/route.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/route.rb b/lib/chef/provider/route.rb index 2439f45eda..be695dd83a 100644 --- a/lib/chef/provider/route.rb +++ b/lib/chef/provider/route.rb @@ -186,7 +186,7 @@ class Chef network_file_name = "/etc/sysconfig/network" converge_by("write route default route to #{network_file_name}") do Chef::Log.debug("#{new_resource} writing default route #{new_resource.gateway} to #{network_file_name}") - if ::File.exists?(network_file_name) + if ::File.exist?(network_file_name) network_file = ::Chef::Util::FileEdit.new(network_file_name) network_file.search_file_replace_line /^GATEWAY=/, "GATEWAY=#{new_resource.gateway}" network_file.insert_line_if_no_match /^GATEWAY=/, "GATEWAY=#{new_resource.gateway}" |