summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Lathrop <paul@tertiusfamily.net>2009-02-27 12:25:28 -0800
committerJames Turnbull <james@lovedthanlost.net>2009-02-28 10:01:23 +1100
commitc052ff881e4a0cf6edfe4c1974597cd3abb378cf (patch)
treedf96ea6696d29a2bb80248ee530d2fbcea1d9a90 /lib
parente2b406239eaa255c41acb31942169296bea71948 (diff)
downloadpuppet-c052ff881e4a0cf6edfe4c1974597cd3abb378cf.tar.gz
puppet-c052ff881e4a0cf6edfe4c1974597cd3abb378cf.tar.xz
puppet-c052ff881e4a0cf6edfe4c1974597cd3abb378cf.zip
Make puppetd --waitforcert option behave as documented:
"You can turn off waiting for certificates by specifying a time of 0." Also add a test to ensure we catch any future regression of this behavior. Signed-off-by: Paul Lathrop <paul@tertiusfamily.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/executables/client/certhandler.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/executables/client/certhandler.rb b/lib/puppet/executables/client/certhandler.rb
index b041397ae..bf3ea167d 100644
--- a/lib/puppet/executables/client/certhandler.rb
+++ b/lib/puppet/executables/client/certhandler.rb
@@ -49,7 +49,12 @@ module Puppet
exit(23) if @one_time
end
- sleep @wait_for_cert
+ if @wait_for_cert > 0
+ sleep @wait_for_cert
+ else
+ Puppet.notice "waitforcert disabled; exiting with no certificate"
+ exit(1)
+ end
end
end