diff options
author | Christopher Brown <cb@opscode.com> | 2009-02-24 14:28:23 -0800 |
---|---|---|
committer | Christopher Brown <cb@opscode.com> | 2009-02-24 14:28:23 -0800 |
commit | 264bf220535fc6dde22687d5a3a8436931254941 (patch) | |
tree | a08ca9156f27f5ae986b12d558ef57c752817511 /chef/bin/chef-client | |
parent | 3ce4cde0fd1d83715ca2a38b5449fcb46afc0c8a (diff) | |
download | chef-264bf220535fc6dde22687d5a3a8436931254941.tar.gz |
fixed the client command line handler finally
fixed the node destroy slice_url
Diffstat (limited to 'chef/bin/chef-client')
-rwxr-xr-x | chef/bin/chef-client | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chef/bin/chef-client b/chef/bin/chef-client index 88a1d2f11a..4503c76ecb 100755 --- a/chef/bin/chef-client +++ b/chef/bin/chef-client @@ -30,7 +30,7 @@ config = { } opts = OptionParser.new do |opts| opts.banner = "Usage: #{$0} [-d DIR|-r FILE] (options)" - { + client_option_hash = { :config_file=> { :short=>"-c CONFIG", :long=>"--config CONFIG", :description=>"The Chef Config file to use", :proc=>nil }, :user=> { :short=>"-u USER", :long=>"--user USER", :description=>"User to change uid to before daemonizing", :proc=>nil }, :group=> { :short=>"-g GROUP", :long=>"--group GROUP", :description=>"Group to change gid to before daemonizing", :proc=>nil }, @@ -43,9 +43,11 @@ opts = OptionParser.new do |opts| :log_location=>{ :short=>"-L LOGLOCATION", :long=>"--logfile LOGLOCATION", :description=>"Set the log file location, defaults to STDOUT - recommended for daemonizing", :proc=>nil }, :validation_token=>{ :short=>"-t TOKEN", :long=>"--token TOKEN", :description=>"Set the openid validation token", :proc=>nil }, } - - opts.on(val[:short],val[:long],val[:description]) do |c| - config[key] = (val[:proc] && val[:proc].call) || c + + client_option_hash.each do |opt_key, opt_val| + opts.on(opt_val[:short],opt_val[:long],opt_val[:description]) do |c| + config[opt_key] = (opt_val[:proc] && opt_val[:proc].call) || c + end end opts.on_tail("-h", "--help", "Show this message") do |