summaryrefslogtreecommitdiff
path: root/lib/chef/application
diff options
context:
space:
mode:
authorRob Redpath <rob.redpath@wwwh.com>2014-11-12 11:23:54 +0000
committerLamont Granquist <lamont@scriptkiddie.org>2015-01-25 10:55:53 -0800
commite5b4162472dd3f11961363340a8cfb0ec8b9ac8e (patch)
tree2a38a9b3d1fbe12dbab2a6469fe6917b3e0c2655 /lib/chef/application
parentaa072a9c2f8883ea939bab9478eb3f048e187161 (diff)
downloadchef-e5b4162472dd3f11961363340a8cfb0ec8b9ac8e.tar.gz
FATAL if pidfile and lockfile match
Diffstat (limited to 'lib/chef/application')
-rw-r--r--lib/chef/application/client.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb
index 49e3c1452e..b6978b8a63 100644
--- a/lib/chef/application/client.rb
+++ b/lib/chef/application/client.rb
@@ -257,6 +257,8 @@ class Chef::Application::Client < Chef::Application
def reconfigure
super
+ Chef::Application.fatal!(pidfile_lockfile_match_error_message) if Chef::Config[:pid_file] == Chef::Config[:lockfile]
+
Chef::Config[:specific_recipes] = cli_arguments.map { |file| File.expand_path(file) }
Chef::Config[:chef_server_url] = config[:chef_server_url] if config.has_key? :chef_server_url
@@ -412,6 +414,10 @@ class Chef::Application::Client < Chef::Application
@signal = SELF_PIPE[0].getc.chr
end
+ def pidfile_lockfile_match_error_message
+ "PID file and lockfile location match - this will cause conflicts"
+ end
+
def unforked_interval_error_message
"Unforked chef-client interval runs are disabled in Chef 12." +
"\nConfiguration settings:" +