summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorEthan Rowe <ethan@endpoint.com>2009-07-30 15:28:16 -0400
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit9cb68417670d6bc98caf1169af4ecafb59f4c14c (patch)
tree2e79e7a58596b949c85f1189eaee78abbd90e25c /lib/puppet
parent82f852a994b3b9b7f487e639d13a6bf2a7dac5b4 (diff)
downloadpuppet-9cb68417670d6bc98caf1169af4ecafb59f4c14c.tar.gz
puppet-9cb68417670d6bc98caf1169af4ecafb59f4c14c.tar.xz
puppet-9cb68417670d6bc98caf1169af4ecafb59f4c14c.zip
Fix 2239 (step four): Refactored Puppet::Daemon's stop/restart methods to set status flags appropriately in Puppet::Application, and removed call to now-deprecated @agent.configure_delayed_restart. This should get the restart and stop behavior for daemons and their agents working nicely with the new global process status interface of Puppet::Application.
Diffstat (limited to 'lib/puppet')
-rwxr-xr-xlib/puppet/daemon.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/puppet/daemon.rb b/lib/puppet/daemon.rb
index 0f538fe44..b6dbf2665 100755
--- a/lib/puppet/daemon.rb
+++ b/lib/puppet/daemon.rb
@@ -1,6 +1,7 @@
require 'puppet'
require 'puppet/util/pidlock'
require 'puppet/external/event-loop'
+require 'puppet/application'
# A module that handles operations common to all daemons. This is included
# into the Server and Client base classes.
@@ -83,11 +84,8 @@ class Puppet::Daemon
end
def restart
- if agent and agent.running?
- agent.configure_delayed_restart
- else
- reexec
- end
+ Puppet::Application.restart!
+ reexec unless agent and agent.running?
end
def reopen_logs
@@ -107,9 +105,9 @@ class Puppet::Daemon
# Stop everything
def stop(args = {:exit => true})
- server.stop if server
+ Puppet::Application.stop!
- agent.stop if agent
+ server.stop if server
remove_pidfile()