diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-08 05:22:24 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-08 05:22:24 +0000 |
| commit | 744ded30a02883dd8ce5fbf2b847f10acb226d6e (patch) | |
| tree | d962b7b21f3a5d20dafd8e7f862c23a2449c2c9b /bin | |
| parent | dc4d98091a5566be289830839f1d6eb39367b42c (diff) | |
Merging the code over from the oscar branch. I will now be doing all development in the trunk again, except for larger changes, which will still get their own branch. This is a merge of the changes from revision 1826 to revision 1834.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1835 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/puppet | 13 | ||||
| -rwxr-xr-x | bin/puppetca | 13 | ||||
| -rwxr-xr-x | bin/puppetd | 13 | ||||
| -rwxr-xr-x | bin/puppetdoc | 13 | ||||
| -rwxr-xr-x | bin/puppetmasterd | 14 | ||||
| -rwxr-xr-x | bin/puppetrun | 13 |
6 files changed, 6 insertions, 73 deletions
diff --git a/bin/puppet b/bin/puppet index 3148cbd50..9421e30f5 100755 --- a/bin/puppet +++ b/bin/puppet @@ -64,14 +64,6 @@ require 'puppet/server' require 'puppet/client' require 'getoptlong' -$haveusage = true - -begin - require 'rdoc/usage' -rescue Exception - $haveusage = false -end - options = [ [ "--debug", "-d", GetoptLong::NO_ARGUMENT ], [ "--help", "-h", GetoptLong::NO_ARGUMENT ], @@ -108,7 +100,7 @@ begin puts "%s" % Puppet.version exit when "--help" - if $haveusage + if Puppet.feature.usage? RDoc::usage && exit else puts "No help available unless you have RDoc::usage installed" @@ -137,9 +129,6 @@ begin } rescue GetoptLong::InvalidOption => detail $stderr.puts "Try '#{$0} --help'" - #if $haveusage - # RDoc::usage(1,'usage') - #end exit(1) end diff --git a/bin/puppetca b/bin/puppetca index 34286f853..d1a47a7b1 100755 --- a/bin/puppetca +++ b/bin/puppetca @@ -87,14 +87,6 @@ require 'puppet' require 'puppet/sslcertificates' require 'getoptlong' -$haveusage = true - -begin - require 'rdoc/usage' -rescue Exception - $haveusage = false -end - options = [ [ "--all", "-a", GetoptLong::NO_ARGUMENT ], [ "--clean", "-c", GetoptLong::NO_ARGUMENT ], @@ -129,7 +121,7 @@ begin generate = arg mode = :generate when "--help" - if $haveusage + if Puppet.feature.usage? RDoc::usage && exit else puts "No help available unless you have RDoc::usage installed" @@ -149,9 +141,6 @@ begin } rescue GetoptLong::InvalidOption => detail $stderr.puts "Try '#{$0} --help'" - #if $haveusage - # RDoc::usage_no_exit('usage') - #end exit(1) end diff --git a/bin/puppetd b/bin/puppetd index cf63f53a6..dc3576f2c 100755 --- a/bin/puppetd +++ b/bin/puppetd @@ -154,13 +154,6 @@ require 'puppet/server' require 'puppet/client' require 'getoptlong' -$haveusage = true -begin - require 'rdoc/usage' -rescue Exception - $haveusage = false -end - options = [ [ "--centrallogging", GetoptLong::NO_ARGUMENT ], [ "--daemonize", "-D", GetoptLong::NO_ARGUMENT ], @@ -223,7 +216,7 @@ begin when "--centrallogging" options[:centrallogs] = true when "--help" - if $haveusage + if Puppet.feature.usage? RDoc::usage && exit else puts "No help available unless you have RDoc::usage installed" @@ -262,10 +255,6 @@ begin rescue GetoptLong::InvalidOption => detail $stderr.puts detail $stderr.puts "Try '#{$0} --help'" - # FIXME RDoc::usage doesn't seem to work - #if $haveusage - # RDoc::usage(1,'usage') - #end exit(1) end diff --git a/bin/puppetdoc b/bin/puppetdoc index c857f6c49..9929edee5 100755 --- a/bin/puppetdoc +++ b/bin/puppetdoc @@ -44,14 +44,6 @@ require 'puppet' require 'getoptlong' -$haveusage = true - -begin - require 'rdoc/usage' -rescue Exception - $haveusage = false -end - result = GetoptLong.new( [ "--arguments", "-a", GetoptLong::NO_ARGUMENT ], [ "--types", "-t", GetoptLong::NO_ARGUMENT ], @@ -72,7 +64,7 @@ begin when "--types" mode = :types when "--help" - if $haveusage + if Puppet.feature.usage? RDoc::usage && exit else puts "No help available unless you have RDoc::usage installed" @@ -82,9 +74,6 @@ begin } rescue GetoptLong::InvalidOption => detail $stderr.puts "Try '#{$0} --help'" - #if $haveusage - # RDoc::usage_no_exit('usage') - #end exit(1) end diff --git a/bin/puppetmasterd b/bin/puppetmasterd index 2bf018b55..ec47075f8 100755 --- a/bin/puppetmasterd +++ b/bin/puppetmasterd @@ -103,14 +103,6 @@ Puppet.config.addargs(options) result = GetoptLong.new(*options) -$haveusage = true - -begin - require 'rdoc/usage' -rescue Exception - $haveusage = false -end - master = {} ca = {} report = {} @@ -136,7 +128,7 @@ begin when "--debug" options[:debug] = true when "--help" - if $haveusage + if Puppet.feature.usage? RDoc::usage && exit else puts "No help available unless you have RDoc::usage installed" @@ -174,10 +166,6 @@ begin rescue GetoptLong::InvalidOption => detail $stderr.puts "Try '#{$0} --help'" #$stderr.puts detail - # FIXME RDoc::usage doesn't seem to work - #if $haveusage - # RDoc::usage(1,'usage') - #end exit(1) end diff --git a/bin/puppetrun b/bin/puppetrun index d4af0abb6..30f1a043f 100755 --- a/bin/puppetrun +++ b/bin/puppetrun @@ -170,14 +170,6 @@ def setupldap end end -$haveusage = true - -begin - require 'rdoc/usage' -rescue Exception - $haveusage = false -end - flags = [ [ "--all", "-a", GetoptLong::NO_ARGUMENT ], [ "--class", "-c", GetoptLong::REQUIRED_ARGUMENT ], @@ -234,7 +226,7 @@ begin when "--host" hosts << arg when "--help" - if $haveusage + if Puppet.feature.usage? RDoc::usage && exit else puts "No help available unless you have RDoc::usage installed" @@ -257,9 +249,6 @@ begin } rescue GetoptLong::InvalidOption => detail $stderr.puts "Try '#{$0} --help'" - #if $haveusage - # RDoc::usage(1,'usage') - #end exit(1) end |
