Update version according to OSCI-883
[packages/precise/mcollective.git] / lib / mcollective / rpc / agent.rb
index d2cf043d40c3bd5409440534842133b730b4b1ea..49a9b3a27bfb2bb6ee6c258c059ee2765bbedfb9 100644 (file)
@@ -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