X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=lib%2Fmcollective%2Frpc%2Fagent.rb;h=49a9b3a27bfb2bb6ee6c258c059ee2765bbedfb9;hb=7c9314f502cde8daad23b61d10b24a542e04154a;hp=d2cf043d40c3bd5409440534842133b730b4b1ea;hpb=b87d2f4e68281062df1913440ca5753ae63314a9;p=packages%2Fprecise%2Fmcollective.git diff --git a/lib/mcollective/rpc/agent.rb b/lib/mcollective/rpc/agent.rb index d2cf043..49a9b3a 100644 --- a/lib/mcollective/rpc/agent.rb +++ b/lib/mcollective/rpc/agent.rb @@ -67,7 +67,7 @@ module MCollective begin # Incoming requests need to be validated against the DDL thus reusing - # all the work users put into creating DDLs and creating a consistant + # all the work users put into creating DDLs and creating a consistent # quality of input validation everywhere with the a simple once off # investment of writing a DDL @request.validate! @@ -144,17 +144,13 @@ module MCollective log_code(:PLMC37, "Starting default activation checks for the '%{agent}' agent", :debug, :agent => agent_name) - should_activate = Config.instance.pluginconf["#{agent_name}.activate_agent"] + should_activate = Util.str_to_bool(Config.instance.pluginconf.fetch("#{agent_name}.activate_agent", true)) - if should_activate + unless should_activate log_code(:PLMC38, "Found plugin configuration '%{agent}.activate_agent' with value '%{should_activate}'", :debug, :agent => agent_name, :should_activate => should_activate) - - unless should_activate =~ /^1|y|true$/ - return false - end end - return true + return should_activate end # Returns an array of actions this agent support @@ -219,7 +215,7 @@ module MCollective end end - [:stdin, :cwd, :environment].each do |k| + [:stdin, :cwd, :environment, :timeout].each do |k| if options.include?(k) shellopts[k] = options[k] end