summaryrefslogtreecommitdiff
path: root/lib/chef/run_lock.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-09-16 16:43:30 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-09-16 16:43:30 -0700
commitdc1dd7f5ec1cd791b08ff03d2f9a4e955e119d4a (patch)
tree2c1c7237d1e7ef21b7719c5a9471ddbca94f49ae /lib/chef/run_lock.rb
parent8fa661058877d5b465f4969e8fef9475af8f96a8 (diff)
downloadchef-dc1dd7f5ec1cd791b08ff03d2f9a4e955e119d4a.tar.gz
Use Chef::Config defaults for lockfile default
Diffstat (limited to 'lib/chef/run_lock.rb')
-rw-r--r--lib/chef/run_lock.rb12
1 files changed, 3 insertions, 9 deletions
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