From c052ff881e4a0cf6edfe4c1974597cd3abb378cf Mon Sep 17 00:00:00 2001 From: Paul Lathrop Date: Fri, 27 Feb 2009 12:25:28 -0800 Subject: 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 --- lib/puppet/executables/client/certhandler.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit