diff options
author | Luke Kanies <luke@madstop.com> | 2009-01-28 17:11:19 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-02-06 18:08:42 -0600 |
commit | fc14b81f99adc9c9308a26d322adaa59a7b7716d (patch) | |
tree | dc731383d3195e37ea3658b9cbc7b0c428579d9f /lib/puppet/agent/locker.rb | |
parent | e8be6dcad2150769b51bf81e95c57491921e68c1 (diff) | |
download | puppet-fc14b81f99adc9c9308a26d322adaa59a7b7716d.tar.gz puppet-fc14b81f99adc9c9308a26d322adaa59a7b7716d.tar.xz puppet-fc14b81f99adc9c9308a26d322adaa59a7b7716d.zip |
Splitting the Agent class into Agent and Configurer
Once I went to add runinterval support to the Agent class,
I realized it's really two classes: One that handles starting,
stopping, running, et al (still called Agent), and one that
handles downloading the catalog, running it, etc. (now
called Configurer).
This commit includes some additional code, but 95% of it is just moving code around.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/agent/locker.rb')
-rw-r--r-- | lib/puppet/agent/locker.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/agent/locker.rb b/lib/puppet/agent/locker.rb index 03736b278..c24fdad64 100644 --- a/lib/puppet/agent/locker.rb +++ b/lib/puppet/agent/locker.rb @@ -30,9 +30,14 @@ module Puppet::Agent::Locker def lockfile unless defined?(@lockfile) - @lockfile = Puppet::Util::Pidlock.new(Puppet[:puppetdlockfile]) + #@lockfile = Puppet::Util::Pidlock.new(Puppet[:puppetdlockfile]) + @lockfile = Puppet::Util::Pidlock.new(lockfile_path) end @lockfile end + + def running? + lockfile.locked? + end end |