diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-13 11:37:52 +0100 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-13 11:37:52 +0100 |
commit | be4618bf6429bddbd9208a88f460c028074fe8c0 (patch) | |
tree | 5fe2cf35367b488a06fccd005c2677c05c619b9a | |
parent | 4dd024388e1f8be894e50dd0eb74d5c9f86b4233 (diff) | |
download | monitoring-plugins-be4618bf6429bddbd9208a88f460c028074fe8c0.tar.gz |
check_tcp: patch backwards compatibility in again
-rw-r--r-- | plugins/check_tcp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 833cdc0c..d2ebc16d 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
@@ -493,6 +493,17 @@ static check_tcp_config_wrapper process_arguments(int argc, char **argv, check_t | |||
493 | usage4(_("No arguments found")); | 493 | usage4(_("No arguments found")); |
494 | } | 494 | } |
495 | 495 | ||
496 | /* backwards compatibility */ | ||
497 | for (int i = 1; i < argc; i++) { | ||
498 | if (strcmp("-to", argv[i]) == 0) { | ||
499 | strcpy(argv[i], "-t"); | ||
500 | } else if (strcmp("-wt", argv[i]) == 0) { | ||
501 | strcpy(argv[i], "-w"); | ||
502 | } else if (strcmp("-ct", argv[i]) == 0) { | ||
503 | strcpy(argv[i], "-c"); | ||
504 | } | ||
505 | } | ||
506 | |||
496 | if (!is_option(argv[1])) { | 507 | if (!is_option(argv[1])) { |
497 | config.server_address = argv[1]; | 508 | config.server_address = argv[1]; |
498 | argv[1] = argv[0]; | 509 | argv[1] = argv[0]; |