summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-03-18 17:08:28 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-03-18 17:08:28 +0000
commitfe2f0d9ffc2c3fd324d9f85d57ff6a7262a3b185 (patch)
treeef434ddd2165cf5cec88d576d8a48cc6047be400
parent5257837ecb85fd37553430fe5e5030d775dbb7bb (diff)
downloadpuppet-fe2f0d9ffc2c3fd324d9f85d57ff6a7262a3b185.tar.gz
puppet-fe2f0d9ffc2c3fd324d9f85d57ff6a7262a3b185.tar.xz
puppet-fe2f0d9ffc2c3fd324d9f85d57ff6a7262a3b185.zip
Fixing #533 -- puppetd now exits in onetime mode.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2289 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r--CHANGELOG2
-rwxr-xr-xbin/puppetd4
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index aed57f7d1..d35ceeef8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,6 @@
0.22.2 (grover)
+ puppetd now exits if no cert is present in onetime mode. (#533)
+
The client configuration cache can be safely removed and the client
will correctly realize the client is not in sync.
diff --git a/bin/puppetd b/bin/puppetd
index 66f35551c..fac30f345 100755
--- a/bin/puppetd
+++ b/bin/puppetd
@@ -214,6 +214,7 @@ begin
Puppet.config.handlearg("--ignorecache")
Puppet.config.handlearg("--no-usecacheonfailure")
options[:onetime] = true
+ options[:waitforcert] = 0
unless Puppet::Util::Log.level == :debug
Puppet::Util::Log.level = :info
end
@@ -242,6 +243,7 @@ begin
options[:client] = false
when "--onetime"
options[:onetime] = true
+ options[:waitforcert] = 0
when "--port"
args[:Port] = arg
when "--logdest"
@@ -320,7 +322,7 @@ if options[:daemonize]
client.daemonize
end
-unless client.cert
+unless client.read_cert
# If we don't already have the certificate, then create a client to
# request one. Use the special ca stuff, don't use the normal server and port.
caclient = Puppet::Network::Client.ca.new()