summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-07-21 15:37:15 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-07-21 15:37:15 +0000
commit2091eddc4e53cb2e16646081b3bb64e1342858f8 (patch)
tree94d77dcf96fb50527678287a51b3948137e9bc66
parent76aec7c684fb877dad8fe5098dfb2c043999bc80 (diff)
downloadpuppet-2091eddc4e53cb2e16646081b3bb64e1342858f8.tar.gz
puppet-2091eddc4e53cb2e16646081b3bb64e1342858f8.tar.xz
puppet-2091eddc4e53cb2e16646081b3bb64e1342858f8.zip
Fixing #200. I basically just moved the daemonize statement before most other code. This makes things a little less nice when starting puppetd manually, since it might still fail and the user would not know without checking logs, but it is the only real option at this point.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1415 980ebf18-57e1-0310-9a29-db15c13687c0
-rwxr-xr-xbin/puppetd17
1 files changed, 9 insertions, 8 deletions
diff --git a/bin/puppetd b/bin/puppetd
index 8b0c732cf..34d017784 100755
--- a/bin/puppetd
+++ b/bin/puppetd
@@ -122,8 +122,8 @@
#
# waitforcert::
# This option only matters for daemons that do not yet have certificates
-# and it is enabled by default, with a value of 300 (seconds). This causes
-# +puppetd+ to connect to the server every 5 minutes and ask it to sign a
+# and it is enabled by default, with a value of 120 (seconds). This causes
+# +puppetd+ to connect to the server every 2 minutes and ask it to sign a
# certificate request. This is useful for the initial setup of a puppet
# client. You can turn off waiting for certificates by specifying a time
# of 0.
@@ -184,7 +184,7 @@ result = GetoptLong.new(*options)
args = {}
options = {
- :waitforcert => 300, # Default to checking for certs every 5 minutes
+ :waitforcert => 120, # Default to checking for certs every 5 minutes
:onetime => false,
:centrallogs => false,
:setdest => false,
@@ -322,6 +322,12 @@ end
server = nil
+# It'd be nice to daemonize later, but we have to daemonize before the
+# waitforcert happens.
+if options[:daemonize]
+ client.daemonize
+end
+
unless client.readcert
# If we don't already have the certificate, then create a client to
# request one.
@@ -432,11 +438,6 @@ else
Puppet.settraps
- # Daemonize as late as possible.
- if options[:daemonize]
- client.daemonize
- end
-
Puppet.start
end