diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/puppet | 23 | ||||
| -rwxr-xr-x | bin/puppetd | 7 | ||||
| -rwxr-xr-x | bin/puppetmasterd | 10 |
3 files changed, 35 insertions, 5 deletions
diff --git a/bin/puppet b/bin/puppet index d3eead009..25807ee1a 100755 --- a/bin/puppet +++ b/bin/puppet @@ -18,6 +18,10 @@ # # = Options # +# confdir:: +# The configuration root directory, where +puppetmasterd+ defaults to looking +# for all of its configuration files. Defaults to +/etc/puppet+. +# # debug:: # Enable full debugging. # @@ -61,11 +65,13 @@ rescue LoadError end result = GetoptLong.new( + [ "--confdir", "-c", GetoptLong::REQUIRED_ARGUMENT ], [ "--debug", "-d", GetoptLong::NO_ARGUMENT ], [ "--help", "-h", GetoptLong::NO_ARGUMENT ], [ "--logdest", "-l", GetoptLong::REQUIRED_ARGUMENT ], [ "--verbose", "-v", GetoptLong::NO_ARGUMENT ], [ "--noop", "-n", GetoptLong::NO_ARGUMENT ], + [ "--use-nodes", GetoptLong::NO_ARGUMENT ], [ "--parse-only", "-p", GetoptLong::NO_ARGUMENT ], [ "--version", "-V", GetoptLong::NO_ARGUMENT ] ) @@ -76,9 +82,15 @@ noop = false logfile = false parseonly = false +master = { + :Local => true +} + begin result.each { |opt,arg| case opt + when "--confdir" + Puppet[:puppetconf] = arg when "--version" puts "%s" % Puppet.version exit @@ -90,7 +102,9 @@ begin exit end when "--noop" - noop = true + Puppet[:noop] = true + when "--use-nodes" + master[:UseNodes] = true when "--verbose" verbose = true when "--parse-only" @@ -121,11 +135,10 @@ elsif verbose Puppet[:loglevel] = :info end +master[:File] = ARGV.shift + begin - server = Puppet::Server::Master.new( - :File => ARGV.shift, - :Local => true - ) + server = Puppet::Server::Master.new(master) rescue => detail $stderr.puts detail exit(1) diff --git a/bin/puppetd b/bin/puppetd index e66083d3c..c7ab08304 100755 --- a/bin/puppetd +++ b/bin/puppetd @@ -28,6 +28,10 @@ # # = Options # +# confdir:: +# The configuration root directory, where +puppetmasterd+ defaults to looking +# for all of its configuration files. Defaults to +/etc/puppet+. +# # debug:: # Enable full debugging. # @@ -91,6 +95,7 @@ rescue LoadError end result = GetoptLong.new( + [ "--confdir", "-c", GetoptLong::REQUIRED_ARGUMENT ], [ "--debug", "-d", GetoptLong::NO_ARGUMENT ], [ "--fqdn", "-f", GetoptLong::REQUIRED_ARGUMENT ], [ "--help", "-h", GetoptLong::NO_ARGUMENT ], @@ -113,6 +118,8 @@ waitforcert = false begin result.each { |opt,arg| case opt + when "--confdir" + Puppet[:puppetconf] = arg when "--help" if $haveusage RDoc::usage && exit diff --git a/bin/puppetmasterd b/bin/puppetmasterd index 055892004..33b3d1c8f 100755 --- a/bin/puppetmasterd +++ b/bin/puppetmasterd @@ -25,6 +25,10 @@ # refers to the autosign configuration file at /etc/puppet/autosign.conf to # determine which hosts should have their certificates signed. # +# confdir:: +# The configuration root directory, where +puppetmasterd+ defaults to looking +# for all of its configuration files. Defaults to +/etc/puppet+. +# # debug:: # Enable full debugging. Causes the daemon not to go into the background. # @@ -90,6 +94,7 @@ require 'puppet/server' result = GetoptLong.new( [ "--autosign", "-a", GetoptLong::NO_ARGUMENT ], + [ "--confdir", "-c", GetoptLong::REQUIRED_ARGUMENT ], [ "--debug", "-d", GetoptLong::NO_ARGUMENT ], [ "--fsconfig", "-f", GetoptLong::REQUIRED_ARGUMENT ], [ "--help", "-h", GetoptLong::NO_ARGUMENT ], @@ -126,6 +131,8 @@ begin case opt when "--autosign" ca[:autosign] = Puppet[:autosign] + when "--confdir" + Puppet[:puppetconf] = arg when "--debug" Puppet[:debug] = true when "--fsconfig" @@ -209,6 +216,9 @@ end unless fs.include?(:Config) if File.exists?(Puppet[:fileserverconfig]) fs[:Config] = Puppet[:fileserverconfig] + else + Puppet.notice "File server config %s does not exist; skipping file serving" % + Puppet[:fileserverconfig] end end |
