diff options
author | John Keiser <jkeiser@opscode.com> | 2013-09-16 16:43:30 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-09-16 16:43:30 -0700 |
commit | dc1dd7f5ec1cd791b08ff03d2f9a4e955e119d4a (patch) | |
tree | 2c1c7237d1e7ef21b7719c5a9471ddbca94f49ae /lib/chef/run_lock.rb | |
parent | 8fa661058877d5b465f4969e8fef9475af8f96a8 (diff) | |
download | chef-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.rb | 12 |
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 |