--0015174bee00afbbc2049d96ae9a
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Hi list,
When using a non-existent macros in a command (like for example
$SERVICEDESC$ in a host notification command), such macro is not
replaced. It is instead left as-is on the command line.
Such construct is interpreted by the shell as a variable (usually
empty) followed by a dollar sign which (usually) expands to a single
dollar and lead users to believe that Nagios replace non-existent
macros with a single dollar (see ticket #34
http://tracker.nagios.org/view.php?id=3D34).
I believe this behavior is not intuitive and should therefore be
modified to simply remove non-existent macros, as the attached patch
does.
What do you think about it ?
Best regards,
--=20
Matthieu KERMAGORET | D=C3=A9veloppeur
[email protected]
MERETHIS est =C3=A9diteur du logiciel Centreon.
--0015174bee00afbbc2049d96ae9a
Content-Type: text/x-patch; charset=US-ASCII;
name="nagios_invalid_macros_are_replaced_by_a_single_dollar.patch"
Content-Disposition: attachment;
filename="nagios_invalid_macros_are_replaced_by_a_single_dollar.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gktwc6s60
ZGlmZiAtLWdpdCBhL2NvbW1vbi9tYWNyb3MuYyBiL2NvbW1vbi9tYWNyb3MuYwppbmRleCBjZTlk
Y2QyLi40NTJlZmRiIDEwMDY0NAotLS0gYS9jb21tb24vbWFjcm9zLmMKKysrIGIvY29tbW9uL21h
Y3Jvcy5jCkBAIC0xODMsMTAgKzE4MywxMiBAQCBpbnQgcHJvY2Vzc19tYWNyb3NfcihuYWdpb3Nf
bWFjcm9zICptYWMsIGNoYXIgKmlucHV0X2J1ZmZlciwgY2hhciAqKm91dHB1dF9idWZmZQogCQkJ
CWxvZ19kZWJ1Z19pbmZvKERFQlVHTF9NQUNST1MsMiwiICBOb24tbWFjcm8uICBSdW5uaW5nIG91
dHB1dCAoJWQpOiAnJXMnXG4iLHN0cmxlbigqb3V0cHV0X2J1ZmZlciksKm91dHB1dF9idWZmZXIp
OwogCiAJCQkJLyogYWRkIHRoZSBwbGFpbiB0ZXh0IHRvIHRoZSBlbmQgb2YgdGhlIGFscmVhZHkg
cHJvY2Vzc2VkIGJ1ZmZlciAqLworCQkJCS8qCiAJCQkJKm91dHB1dF9idWZmZXI9KGNoYXIgKily
ZWFsbG9jKCpvdXRwdXRfYnVmZmVyLHN0cmxlbigqb3V0cHV0X2J1ZmZlcikrc3RybGVuKHRlbXBf
YnVmZmVyKSszKTsKIAkJCQlzdHJjYXQoKm91dHB1dF9idWZmZXIsIiQiKTsKIAkJCQlzdHJjYXQo
Km91dHB1dF9idWZmZXIsdGVtcF9idWZmZXIpOwogCQkJCXN0cmNhdCgqb3V0cHV0X2J1ZmZlciwi
JCIpOworCQkJCSovCiAJCQkJfQogCiAJCQkvKiBpbnNlcnQgbWFjcm8gKi8K
--0015174bee00afbbc2049d96ae9a--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]