|Komponente||Core & Setup|
|Titel||Special agents: Remove unreplaced macros from special agent command lines|
|Check_MK Edition||Check_MK Raw Edition (CRE)|
|Level||1 - Trivial Change|
|Kompatibilität||Kompatibel- benötigt keine manuelles eingreifen|
In previous versions the command lines of special agent calls like e.g. custom data source programs could contain unreplaced macros in the format $_HOST_MACRO$ which were later inpterpreted as shell variables. In case there was no such variable in the shell environment, the trailing $ was left on the command line as single character.
This could lead to some broken command line calls. We now do the replacement as usual. After replacing all known macros, the command line is searched for left over $...$ macros and remove the whole macro from the command line. This should make optional macro handling a lot easier.