bin/puppetd in puppet-0.22.4 vs bin/puppetd in puppet-0.23.0
- old
+ new
@@ -32,11 +32,11 @@
# daemon use. Run with no arguments and no configuration, it will go into the
# backgroun, attempt to get a signed certificate, and retrieve and apply its
# configuration every 30 minutes.
#
# Some flags are meant specifically for interactive use -- in particular,
-# +test+ and +tags+ are useful. +test+ enables verobse logging, causes
+# +test+ and +tags+ are useful. +test+ enables verbose logging, causes
# the daemon to stay in the foreground, exits if the server's configuration is
# invalid (this happens if, for instance, you've left a syntax error on the
# server), and exits after running the configuration once (rather than hanging
# around as a long-running process).
#
@@ -109,15 +109,16 @@
# onetime::
# Run the configuration once, rather than as a long-running daemon. This is
# useful for interactively running puppetd.
#
# serve::
-# Start another type of server. By default default, +puppetd+ will start
-# a server that allows authenticated and authorized remote nodes to trigger
-# the configuration to be pulled down and applied. You can specify
-# any other type of service here that does not require configuration,
-# e.g., filebucket, ca, or pelement.
+# Start another type of server. By default, +puppetd+ will start
+# a service handler that allows authenticated and authorized remote nodes to
+# trigger the configuration to be pulled down and applied. You can specify
+# any handler here that does not require configuration, e.g., filebucket, ca,
+# or resource. The handlers are in +lib/puppet/network/handler+, and the names
+# must match exactly, both in the call to +serve+ and in +namespaceauth.conf+.
#
# test::
# Enable the most common options used for testing. These are +onetime+,
# +verbose+, +ignorecache, and +no-usecacheonfailure+.
#
@@ -167,10 +168,11 @@
[ "--fqdn", "-f", GetoptLong::REQUIRED_ARGUMENT ],
[ "--help", "-h", GetoptLong::NO_ARGUMENT ],
[ "--logdest", "-l", GetoptLong::REQUIRED_ARGUMENT ],
[ "--onetime", "-o", GetoptLong::NO_ARGUMENT ],
[ "--test", "-t", GetoptLong::NO_ARGUMENT ],
+ [ "--serve", "-s", GetoptLong::REQUIRED_ARGUMENT ],
[ "--no-client", GetoptLong::NO_ARGUMENT ],
[ "--verbose", "-v", GetoptLong::NO_ARGUMENT ],
[ "--version", "-V", GetoptLong::NO_ARGUMENT ],
[ "--waitforcert", "-w", GetoptLong::REQUIRED_ARGUMENT ]
]
@@ -203,19 +205,22 @@
when "--daemonize"
options[:daemonize] = true
when "--disable"
options[:disable] = true
when "--serve"
- if klass = Puppet::Network::Server::Handler.handler(arg)
- options[:serve][klass.name] = klass
+ if Puppet::Network::Handler.handler(arg)
+ options[:serve][arg.to_sym] = {}
+ else
+ raise "Could not find handler for %s" % arg
end
when "--enable"
options[:enable] = true
when "--test"
# Enable all of the most common test options.
Puppet.config.handlearg("--ignorecache")
Puppet.config.handlearg("--no-usecacheonfailure")
+ Puppet.config.handlearg("--no-splay")
options[:onetime] = true
options[:waitforcert] = 0
unless Puppet::Util::Log.level == :debug
Puppet::Util::Log.level = :info
end
@@ -266,13 +271,11 @@
$stderr.puts "Try '#{$0} --help'"
exit(1)
end
# Now parse the config
-if Puppet[:config] and File.exists? Puppet[:config]
- Puppet.config.parse(Puppet[:config])
-end
+Puppet.parse_config
Puppet.genconfig
Puppet.genmanifest
# Default to daemonizing, but if verbose or debug is specified,
@@ -374,13 +377,11 @@
handlers = nil
if options[:serve].empty?
handlers = {:Runner => {}}
else
- handlers = options[:serve].inject({}) do |hash, name, klass|
- hash[name] = {}
- end
+ handlers = options[:serve]
end
handlers.each do |name, hash|
Puppet.info "Starting handler for %s" % name
end
@@ -443,6 +444,6 @@
Puppet.settraps
Puppet.start
end
-# $Id: puppetd 2375 2007-03-30 23:17:40Z luke $
+# $Id: puppetd 2594 2007-06-15 23:11:43Z luke $