summaryrefslogtreecommitdiffstats
path: root/plugins-root
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-root')
-rw-r--r--plugins-root/Makefile.am2
-rw-r--r--plugins-root/check_icmp.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/plugins-root/Makefile.am b/plugins-root/Makefile.am
index 7cd2675..40aa020 100644
--- a/plugins-root/Makefile.am
+++ b/plugins-root/Makefile.am
@@ -26,7 +26,7 @@ EXTRA_PROGRAMS = pst3
26 26
27EXTRA_DIST = t pst3.c 27EXTRA_DIST = t pst3.c
28 28
29BASEOBJS = ../plugins/utils.o ../lib/libmonitoringplug.a ../gl/libgnu.a 29BASEOBJS = ../plugins/utils.o ../lib/libmonitoringplug.a ../gl/libgnu.a $(LIB_CRYPTO)
30NETOBJS = ../plugins/netutils.o $(BASEOBJS) $(EXTRA_NETOBJS) 30NETOBJS = ../plugins/netutils.o $(BASEOBJS) $(EXTRA_NETOBJS)
31NETLIBS = $(NETOBJS) $(SOCKETLIBS) 31NETLIBS = $(NETOBJS) $(SOCKETLIBS)
32 32
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c
index f8f1535..1f87b75 100644
--- a/plugins-root/check_icmp.c
+++ b/plugins-root/check_icmp.c
@@ -451,6 +451,14 @@ main(int argc, char **argv)
451 packets = 5; 451 packets = 5;
452 } 452 }
453 453
454 /* support "--help" and "--version" */
455 if(argc == 2) {
456 if(!strcmp(argv[1], "--help"))
457 strcpy(argv[1], "-h");
458 if(!strcmp(argv[1], "--version"))
459 strcpy(argv[1], "-V");
460 }
461
454 /* Parse protocol arguments first */ 462 /* Parse protocol arguments first */
455 for(i = 1; i < argc; i++) { 463 for(i = 1; i < argc; i++) {
456 while((arg = getopt(argc, argv, opts_str)) != EOF) { 464 while((arg = getopt(argc, argv, opts_str)) != EOF) {
@@ -555,14 +563,6 @@ main(int argc, char **argv)
555 /* Parse extra opts if any */ 563 /* Parse extra opts if any */
556 argv=np_extra_opts(&argc, argv, progname); 564 argv=np_extra_opts(&argc, argv, progname);
557 565
558 /* support "--help" and "--version" */
559 if(argc == 2) {
560 if(!strcmp(argv[1], "--help"))
561 strcpy(argv[1], "-h");
562 if(!strcmp(argv[1], "--version"))
563 strcpy(argv[1], "-V");
564 }
565
566 argv = &argv[optind]; 566 argv = &argv[optind];
567 while(*argv) { 567 while(*argv) {
568 add_target(*argv); 568 add_target(*argv);