diff options
author | Matthias Eble <psychotrahe@users.sourceforge.net> | 2007-06-20 09:01:07 +0000 |
---|---|---|
committer | Matthias Eble <psychotrahe@users.sourceforge.net> | 2007-06-20 09:01:07 +0000 |
commit | a82c2b4c3e9eb4fddc26f5d7840bfef0fbfbc141 (patch) | |
tree | d568c3c5d35024b17b065d452f5b8f4a17cb3e82 /plugins | |
parent | 1aa01940861cae855a9b7cd2c7ccdebc116b309a (diff) | |
download | monitoring-plugins-a82c2b4c3e9eb4fddc26f5d7840bfef0fbfbc141.tar.gz |
added -V/--version to check_cluster
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1745 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_cluster.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/check_cluster.c b/plugins/check_cluster.c index 5d52d42d..703fff97 100644 --- a/plugins/check_cluster.c +++ b/plugins/check_cluster.c @@ -151,6 +151,7 @@ int process_arguments(int argc, char **argv){ {"host", no_argument, 0,'h'}, {"service", no_argument, 0,'s'}, {"verbose", no_argument, 0,'v'}, + {"version", no_argument, 0,'V'}, {"help", no_argument, 0,'H'}, {0,0,0,0} }; @@ -161,7 +162,7 @@ int process_arguments(int argc, char **argv){ while(1){ - c=getopt_long(argc,argv,"hHsvw:c:d:l:",longopts,&option); + c=getopt_long(argc,argv,"hHsvVw:c:d:l:",longopts,&option); if(c==-1 || c==EOF || c==1) break; @@ -200,6 +201,11 @@ int process_arguments(int argc, char **argv){ verbose++; break; + case 'V': /* version */ + print_revision (progname, revision); + exit (STATE_OK); + break; + case 'H': /* help */ print_help(); exit(STATE_UNKNOWN); |