puppet: Fixed puppet-check for Puppet 3
This commit is contained in:
parent
d7ff4cafbc
commit
0a4ac9874a
1 changed files with 5 additions and 1 deletions
|
@ -44,7 +44,11 @@ begin
|
||||||
end
|
end
|
||||||
|
|
||||||
# check if deadlock file is too old
|
# check if deadlock file is too old
|
||||||
dlock = Puppet.settings.value("puppetdlockfile")
|
if Puppet.version[/\d+/].to_i >= 3
|
||||||
|
dlock = Puppet.settings.value("agent_disabled_lockfile")
|
||||||
|
else
|
||||||
|
dlock = Puppet.settings.value("puppetdlockfile")
|
||||||
|
end
|
||||||
if File.exists?(dlock) and Time.new - File.new(dlock).mtime > 43200
|
if File.exists?(dlock) and Time.new - File.new(dlock).mtime > 43200
|
||||||
err = "puppetd deadlock file is over 12 hours old, removing it and sending HUP to daemon\n"
|
err = "puppetd deadlock file is over 12 hours old, removing it and sending HUP to daemon\n"
|
||||||
Syslog.warning err
|
Syslog.warning err
|
||||||
|
|
Loading…
Add table
Reference in a new issue