diff options
author | Paul Lathrop <paul@tertiusfamily.net> | 2009-02-27 12:25:28 -0800 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-02-28 10:01:23 +1100 |
commit | c052ff881e4a0cf6edfe4c1974597cd3abb378cf (patch) | |
tree | df96ea6696d29a2bb80248ee530d2fbcea1d9a90 /lib/puppet | |
parent | e2b406239eaa255c41acb31942169296bea71948 (diff) | |
download | puppet-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/puppet')
-rw-r--r-- | lib/puppet/executables/client/certhandler.rb | 7 |
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 |