Fix wrong nscp path w/ command_endpoint runtime macros

Do not allow to override the nscp path by runtime macros.
This causes the (linux) master to send just "." as $nscp_path$
and the windows client ignores the local global constant NscpPath
being overridden by the master.

Only happens with command_endpoints where runtime macros are passed
from the master to the clients.

fixes #9456
This commit is contained in:
Michael Friedrich 2015-06-19 13:30:26 +02:00
parent ffde59b508
commit c1923c9e5a
2 changed files with 1 additions and 3 deletions

View File

@ -1077,7 +1077,6 @@ Custom attributes passed as [command parameters](3-monitoring-basics.md#command-
Name | Description Name | Description
----------------|-------------- ----------------|--------------
nscp_path | **Optional.** Can be used to override the NSClient++ on a per-command basis. Defaults to NscpPath.
nscp_log_level | **Optional.** The log level. Defaults to "critical". nscp_log_level | **Optional.** The log level. Defaults to "critical".
nscp_load_all | **Optional.** Whether to load all modules. Defaults to true. nscp_load_all | **Optional.** Whether to load all modules. Defaults to true.
nscp_boot | **Optional.** Whether to use the --boot option. Defaults to true. nscp_boot | **Optional.** Whether to use the --boot option. Defaults to true.

View File

@ -24,7 +24,7 @@ if (!globals.contains("NscpPath")) {
object CheckCommand "nscp-local" { object CheckCommand "nscp-local" {
import "plugin-check-command" import "plugin-check-command"
command = [ "$nscp_path$\\nscp.exe", "client" ] command = [ NscpPath + "\\nscp.exe", "client" ]
arguments = { arguments = {
"--log" = "$nscp_log_level$" "--log" = "$nscp_log_level$"
@ -39,7 +39,6 @@ object CheckCommand "nscp-local" {
"-a" = "$nscp_arguments$" "-a" = "$nscp_arguments$"
} }
vars.nscp_path = {{ NscpPath }}
vars.nscp_log_level = "critical" vars.nscp_log_level = "critical"
vars.nscp_load_all = true vars.nscp_load_all = true
vars.nscp_boot = true vars.nscp_boot = true