    # File lib/chef/knife/client_reregister.rb, line 37
          def run
            @client_name = @name_args[0]

            if @client_name.nil?
              show_usage
              ui.fatal("You must specify a client name")
              exit 1
            end

            client = Chef::ApiClient.load(@client_name)
            key = client.save(new_key=true)
            if config[:file]
              File.open(config[:file], "w") do |f|
                f.print(key['private_key'])
              end
            else
              ui.msg key['private_key']
            end
          end