From dc1dd7f5ec1cd791b08ff03d2f9a4e955e119d4a Mon Sep 17 00:00:00 2001 From: John Keiser Date: Mon, 16 Sep 2013 16:43:30 -0700 Subject: Use Chef::Config defaults for lockfile default --- lib/chef/run_lock.rb | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'lib/chef/run_lock.rb') diff --git a/lib/chef/run_lock.rb b/lib/chef/run_lock.rb index 50046c2396..4bde09de54 100644 --- a/lib/chef/run_lock.rb +++ b/lib/chef/run_lock.rb @@ -34,15 +34,9 @@ class Chef # Create a new instance of RunLock # === Arguments - # * config::: This will generally be the `Chef::Config`, but any Hash-like - # object with Symbol keys will work. See 'Parameters' section. - # === Parameters/Config - # * :lockfile::: if set, this will be used as the full path to the lockfile. - # * :file_cache_path::: if `:lockfile` is not set, the lock file will be - # named "chef-client-running.pid" and be placed in the directory given by - # `:file_cache_path` - def initialize(config) - @runlock_file = config[:lockfile] || "#{config[:file_cache_path]}/chef-client-running.pid" + # * :lockfile::: the full path to the lockfile. + def initialize(lockfile) + @runlock_file = lockfile @runlock = nil end -- cgit v1.2.1