1
require 'puppet/util/pidlock'
3
# Break out the code related to locking the agent. This module is just
4
# included into the agent, but having it here makes it easier to test.
5
module Puppet::Agent::Locker
6
# Let the daemon run again, freely in the filesystem.
8
lockfile.unlock(:anonymous => true)
11
# Stop the daemon from making any catalog runs.
13
lockfile.lock(:anonymous => true)
16
# Yield if we get a lock, else do nothing. Return
17
# true/false depending on whether we get the lock.
32
unless defined?(@lockfile)
33
@lockfile = Puppet::Util::Pidlock.new(lockfile_path)