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!
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