diff options
| author | Luke Kanies <luke@madstop.com> | 2008-03-31 23:56:09 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-03-31 23:56:09 -0500 |
| commit | 88dc49cb7b0efe757c92ce28c807b91335acb07a (patch) | |
| tree | 13fe4561f1f524f97a8bb2c1ff84c1ef981d0241 /bin/puppetd | |
| parent | 4165edaeb71ee2883b1bb85ff39a52d5628b259f (diff) | |
| parent | a8592f1009040ebf30a98268610915cc33bb3f63 (diff) | |
| download | puppet-88dc49cb7b0efe757c92ce28c807b91335acb07a.tar.gz puppet-88dc49cb7b0efe757c92ce28c807b91335acb07a.tar.xz puppet-88dc49cb7b0efe757c92ce28c807b91335acb07a.zip | |
Merge branch 'master' into master_no_global_resources
Conflicts:
lib/puppet/node/catalog.rb
lib/puppet/type/pfile.rb
lib/puppet/type/pfilebucket.rb
lib/puppet/util/filetype.rb
spec/unit/node/catalog.rb
spec/unit/other/transbucket.rb
spec/unit/ral/provider/mount/parsed.rb
spec/unit/ral/types/file.rb
spec/unit/ral/types/interface.rb
spec/unit/ral/types/mount.rb
spec/unit/ral/types/package.rb
spec/unit/ral/types/schedule.rb
spec/unit/ral/types/service.rb
test/language/compile.rb
test/language/lexer.rb
test/language/snippets.rb
test/lib/puppettest.rb
test/ral/types/basic.rb
test/ral/types/cron.rb
test/ral/types/exec.rb
test/ral/types/file.rb
test/ral/types/file/target.rb
test/ral/types/filebucket.rb
test/ral/types/fileignoresource.rb
test/ral/types/filesources.rb
test/ral/types/group.rb
test/ral/types/host.rb
test/ral/types/parameter.rb
test/ral/types/sshkey.rb
test/ral/types/tidy.rb
test/ral/types/user.rb
test/ral/types/yumrepo.rb
Diffstat (limited to 'bin/puppetd')
| -rwxr-xr-x | bin/puppetd | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/bin/puppetd b/bin/puppetd index 297d4876d..f652e6b08 100755 --- a/bin/puppetd +++ b/bin/puppetd @@ -188,6 +188,8 @@ args = {} options = { :waitforcert => 120, # Default to checking for certs every 5 minutes :onetime => false, + :verbose => false, + :debug => false, :centrallogs => false, :setdest => false, :enable => false, @@ -228,11 +230,9 @@ begin puts "%s" % Puppet.version exit when "--verbose" - Puppet::Util::Log.level = :info - Puppet::Util::Log.newdestination(:console) + options[:verbose] = true when "--debug" - Puppet::Util::Log.level = :debug - Puppet::Util::Log.newdestination(:console) + options[:debug] = true when "--fqdn" options[:fqdn] = arg when "--no-client" @@ -247,6 +247,9 @@ begin Puppet::Util::Log.newdestination(arg) options[:setdest] = true rescue => detail + if Puppet[:debug] + puts detail.backtrace + end $stderr.puts detail.to_s end when "--waitforcert" @@ -272,12 +275,23 @@ if options[:test] Puppet.settings.handlearg("--no-splay") Puppet.settings.handlearg("--show_diff") Puppet.settings.handlearg("--no-daemonize") + options[:verbose] = true options[:onetime] = true options[:waitforcert] = 0 - unless Puppet::Util::Log.level == :debug +end + +# Handle the logging settings. +if options[:debug] or options[:verbose] + Puppet::Util::Log.newdestination(:console) + if options[:debug] + Puppet::Util::Log.level = :debug + else Puppet::Util::Log.level = :info end - Puppet::Util::Log.newdestination(:console) +end + +unless options[:setdest] + Puppet::Util::Log.newdestination(:syslog) end Puppet.genconfig @@ -288,10 +302,6 @@ if Puppet[:noop] Puppet[:show_diff] = true end -unless options[:setdest] - Puppet::Util::Log.newdestination(:syslog) -end - args[:Server] = Puppet[:server] if options[:fqdn] args[:FQDN] = options[:fqdn] @@ -374,7 +384,7 @@ if Puppet[:listen] and ! options[:onetime] # to clients. In the meantime, we just disable CRL checking if # the CRL file doesn't exist unless File::exist?(Puppet[:cacrl]) - Puppet[:cacrl] = 'none' + Puppet[:cacrl] = 'false' end handlers = nil |
