diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2022-12-08 21:26:17 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2022-12-08 21:26:17 +0100 |
commit | 2a571fc2f724d017c2035a4746f402362c4ba65b (patch) | |
tree | 7122d6907badf695ccd658a12a10bd355b7e7a99 | |
parent | e2fda2e2ca32a5200d9c765111585e4942b0cc81 (diff) | |
parent | 1a923c362d61d7f395f268576d40a54c658f0fc6 (diff) | |
download | monitoring-plugins-2a571fc2f724d017c2035a4746f402362c4ba65b.tar.gz |
Merge remote-tracking branch 'gh/by_ssh_random_wait' into by_ssh_random_waitby_ssh_random_wait
-rw-r--r-- | plugins-root/check_icmp.c | 16 | ||||
-rw-r--r-- | plugins/t/check_http.t | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index f8f15351..1f87b75f 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c @@ -451,6 +451,14 @@ main(int argc, char **argv) packets = 5; } + /* support "--help" and "--version" */ + if(argc == 2) { + if(!strcmp(argv[1], "--help")) + strcpy(argv[1], "-h"); + if(!strcmp(argv[1], "--version")) + strcpy(argv[1], "-V"); + } + /* Parse protocol arguments first */ for(i = 1; i < argc; i++) { while((arg = getopt(argc, argv, opts_str)) != EOF) { @@ -555,14 +563,6 @@ main(int argc, char **argv) /* Parse extra opts if any */ argv=np_extra_opts(&argc, argv, progname); - /* support "--help" and "--version" */ - if(argc == 2) { - if(!strcmp(argv[1], "--help")) - strcpy(argv[1], "-h"); - if(!strcmp(argv[1], "--version")) - strcpy(argv[1], "-V"); - } - argv = &argv[optind]; while(*argv) { add_target(*argv); diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t index 0c866229..1ca52f61 100644 --- a/plugins/t/check_http.t +++ b/plugins/t/check_http.t @@ -103,7 +103,7 @@ SKIP: { cmp_ok( $res->return_code, "==", 0, "And also when not found"); } SKIP: { - skip "No internet access", 23 if $internet_access eq "no"; + skip "No internet access", 22 if $internet_access eq "no"; $res = NPTest->testCmd( "./$plugin --ssl $host_tls_http" |