From 6fbd14fea5c111a23d9074d25499991cbfa58f79 Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Sun, 23 Nov 2008 05:38:47 +0000 Subject: Removing CVS/SVN tags and replacing with git-based versioning For contrib/, full tags have been imported from subversion git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/Makefile.am | 16 +++++++++++++--- plugins/check_apt.c | 9 ++------- plugins/check_by_ssh.c | 8 ++------ plugins/check_cluster.c | 9 ++------- plugins/check_dig.c | 8 ++------ plugins/check_disk.c | 8 ++------ plugins/check_dns.c | 8 ++------ plugins/check_dummy.c | 8 ++------ plugins/check_fping.c | 8 ++------ plugins/check_game.c | 8 ++------ plugins/check_hpjd.c | 8 ++------ plugins/check_http.c | 12 ++++-------- plugins/check_ide_smart.c | 8 ++------ plugins/check_ldap.c | 8 ++------ plugins/check_load.c | 8 ++------ plugins/check_mrtg.c | 8 ++------ plugins/check_mrtgtraf.c | 8 ++------ plugins/check_mysql.c | 8 ++------ plugins/check_mysql_query.c | 8 ++------ plugins/check_nagios.c | 8 ++------ plugins/check_nt.c | 8 ++------ plugins/check_ntp.c | 8 ++------ plugins/check_ntp_peer.c | 8 ++------ plugins/check_ntp_time.c | 8 ++------ plugins/check_nwstat.c | 8 ++------ plugins/check_overcr.c | 8 ++------ plugins/check_pgsql.c | 8 ++------ plugins/check_ping.c | 8 ++------ plugins/check_procs.c | 8 ++------ plugins/check_radius.c | 8 ++------ plugins/check_real.c | 8 ++------ plugins/check_smtp.c | 8 ++------ plugins/check_snmp.c | 8 ++------ plugins/check_ssh.c | 12 +++--------- plugins/check_swap.c | 8 ++------ plugins/check_tcp.c | 7 ++----- plugins/check_time.c | 8 ++------ plugins/check_ups.c | 8 ++------ plugins/check_users.c | 8 ++------ plugins/common.h | 3 --- plugins/negate.c | 8 ++------ plugins/netutils.c | 3 --- plugins/netutils.h | 3 --- plugins/popen.c | 3 --- plugins/popen.h | 1 - plugins/runcmd.c | 3 --- plugins/runcmd.h | 1 - plugins/sslutils.c | 3 --- plugins/t/check_by_ssh.t | 1 - plugins/t/check_cluster.t | 1 - plugins/t/check_dig.t | 1 - plugins/t/check_disk.t | 1 - plugins/t/check_dns.t | 1 - plugins/t/check_dummy.t | 1 - plugins/t/check_fping.t | 1 - plugins/t/check_ftp.t | 1 - plugins/t/check_hpjd.t | 1 - plugins/t/check_http.t | 1 - plugins/t/check_imap.t | 1 - plugins/t/check_jabber.t | 1 - plugins/t/check_load.t | 1 - plugins/t/check_mysql.t | 1 - plugins/t/check_mysql_query.t | 1 - plugins/t/check_nagios.t | 1 - plugins/t/check_ntp.t | 1 - plugins/t/check_ping.t | 1 - plugins/t/check_pop.t | 1 - plugins/t/check_procs.t | 1 - plugins/t/check_smtp.t | 1 - plugins/t/check_snmp.t | 1 - plugins/t/check_swap.t | 1 - plugins/t/check_tcp.t | 1 - plugins/t/check_time.t | 1 - plugins/t/check_udp.t | 1 - plugins/t/check_users.t | 1 - plugins/t/negate.t | 2 -- plugins/urlize.c | 8 ++------ plugins/utils.c | 21 +++------------------ plugins/utils.h | 3 --- 79 files changed, 99 insertions(+), 319 deletions(-) (limited to 'plugins') diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 85e4a5dd..59876902 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -1,5 +1,11 @@ ## Process this file with automake to produce Makefile.in +NP-VERSION-FILE: .FORCE-NP-VERSION-FILE + @$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN +-include NP-VERSION-FILE + +AM_CFLAGS = -DNP_VERSION='"$(NP_VERSION)"' + VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl @LDAPINCLUDE@ @PGINCLUDE@ @SSLINCLUDE@ @@ -65,10 +71,10 @@ check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS) check_load_LDADD = $(BASEOBJS) popen.o check_mrtg_LDADD = $(BASEOBJS) check_mrtgtraf_LDADD = $(BASEOBJS) -check_mysql_CFLAGS = $(MYSQLCFLAGS) +check_mysql_CFLAGS = $(MYSQLCFLAGS) -DNP_VERSION='"$(NP_VERSION)"' check_mysql_CPPFLAGS = $(MYSQLINCLUDE) check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS) -check_mysql_query_CFLAGS = $(MYSQLCFLAGS) +check_mysql_query_CFLAGS = $(MYSQLCFLAGS) -DNP_VERSION='"$(NP_VERSION)"' check_mysql_query_CPPFLAGS = $(MYSQLINCLUDE) check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS) check_nagios_LDADD = $(BASEOBJS) runcmd.o @@ -153,7 +159,7 @@ getaddrinfo.o: getaddrinfo.h $(PLUGINHDRS) gethostbyname.o: gethostbyname.h $(PLUGINHDRS) -all-local: $(check_tcp_programs) +all-local: $(check_tcp_programs) NP-VERSION-FILE $(check_tcp_programs): check_tcp rm -f $@ @@ -166,6 +172,10 @@ install-exec-hook: clean-local: rm -f $(check_tcp_programs) + rm -f NP-VERSION-FILE uninstall-local: cd $(DESTDIR)$(libexecdir) && rm -f $(check_tcp_programs) + +.PHONY: .FORCE-NP-VERSION-FILE + diff --git a/plugins/check_apt.c b/plugins/check_apt.c index 49a7c4f7..3da54bcf 100644 --- a/plugins/check_apt.c +++ b/plugins/check_apt.c @@ -7,8 +7,6 @@ * * Original author: Sean Finney * -* Last Modified: $Date$ -* * Description: * * This file contains the check_apt plugin @@ -29,12 +27,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ -* *****************************************************************************/ const char *progname = "check_apt"; -const char *revision = "$Revision$"; const char *copyright = "2006-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -159,7 +154,7 @@ int process_arguments (int argc, char **argv) { print_help(); exit(STATE_OK); case 'V': - print_revision(progname, revision); + print_revision(progname, NP_VERSION); exit(STATE_OK); case 'v': verbose++; @@ -404,7 +399,7 @@ char* construct_cmdline(upgrade_type u, const char *opts){ void print_help (void) { - print_revision(progname, revision); + print_revision(progname, NP_VERSION); printf(_(COPYRIGHT), copyright, email); diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c index ce62ebaf..d0dbf34a 100644 --- a/plugins/check_by_ssh.c +++ b/plugins/check_by_ssh.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_by_ssh plugin @@ -25,12 +23,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_by_ssh"; -const char *revision = "$Revision$"; const char *copyright = "2000-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -201,7 +197,7 @@ process_arguments (int argc, char **argv) switch (c) { case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -339,7 +335,7 @@ validate_arguments (void) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Karl DeBisschop \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_cluster.c b/plugins/check_cluster.c index 04919e0d..01385886 100644 --- a/plugins/check_cluster.c +++ b/plugins/check_cluster.c @@ -6,9 +6,6 @@ * Copyright (c) 2000-2004 Ethan Galstad (nagios@nagios.org) * Copyright (c) 2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* -* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -22,12 +19,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_cluster"; -const char *revision = "$Revision$"; const char *copyright = "2000-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -204,7 +199,7 @@ int process_arguments(int argc, char **argv){ break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); break; @@ -228,7 +223,7 @@ int process_arguments(int argc, char **argv){ void print_help(void) { - print_revision(progname, revision); + print_revision(progname, NP_VERSION); printf ("Copyright (c) 2000-2004 Ethan Galstad (nagios@nagios.org)\n"); printf(COPYRIGHT, copyright, email); diff --git a/plugins/check_dig.c b/plugins/check_dig.c index 34197ecc..08be9373 100644 --- a/plugins/check_dig.c +++ b/plugins/check_dig.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2002-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_dig plugin @@ -25,7 +23,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ @@ -36,7 +33,6 @@ * because on some architectures those strings are in non-writable memory */ const char *progname = "check_dig"; -const char *revision = "$Revision$"; const char *copyright = "2002-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -220,7 +216,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'H': /* hostname */ host_or_die(optarg); @@ -312,7 +308,7 @@ print_help (void) asprintf (&myport, "%d", DEFAULT_PORT); - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 2000 Karl DeBisschop \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 12b77a8a..98a061fb 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_disk plugin @@ -25,13 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_disk"; const char *program_name = "check_disk"; /* Required for coreutils libs */ -const char *revision = "$Revision$"; const char *copyright = "1999-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -787,7 +783,7 @@ process_arguments (int argc, char **argv) group = NULL; break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -896,7 +892,7 @@ INPUT ERROR: C_DF (%lu) should be less than W_DF (%lu) and both should be greate void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 6bedfefc..bb206a05 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_dns plugin @@ -28,12 +26,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_dns"; -const char *revision = "$Revision$"; const char *copyright = "2000-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -363,7 +359,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'v': /* version */ verbose = TRUE; @@ -446,7 +442,7 @@ validate_arguments () void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_dummy.c b/plugins/check_dummy.c index ff600a79..8c3f5354 100644 --- a/plugins/check_dummy.c +++ b/plugins/check_dummy.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_dummy plugin @@ -27,12 +25,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_dummy"; -const char *revision = "$Revision$"; const char *copyright = "1999-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -55,7 +51,7 @@ main (int argc, char **argv) if (argc < 2) usage4 (_("Could not parse arguments")); else if (strcmp (argv[1], "-V") == 0 || strcmp (argv[1], "--version") == 0) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); } else if (strcmp (argv[1], "-h") == 0 || strcmp (argv[1], "--help") == 0) { @@ -100,7 +96,7 @@ main (int argc, char **argv) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_fping.c b/plugins/check_fping.c index aeb2f936..75c7860d 100644 --- a/plugins/check_fping.c +++ b/plugins/check_fping.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_disk plugin @@ -28,12 +26,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_fping"; -const char *revision = "$Revision$"; const char *copyright = "2000-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -264,7 +260,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'v': /* verbose mode */ verbose = TRUE; @@ -368,7 +364,7 @@ void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Didi Rieder \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_game.c b/plugins/check_game.c index 2a23b742..235be65c 100644 --- a/plugins/check_game.c +++ b/plugins/check_game.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2002-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_game plugin @@ -28,12 +26,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_game"; -const char *revision = "$Revision$"; const char *copyright = "2002-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -202,7 +198,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'v': /* version */ verbose = TRUE; @@ -293,7 +289,7 @@ validate_arguments (void) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ian Cass, Knowledge Matters Limited\n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c index c815cc70..add9cc82 100644 --- a/plugins/check_hpjd.c +++ b/plugins/check_hpjd.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_hpjd plugin @@ -28,12 +26,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_hpjd"; -const char *revision = "$Revision$"; const char *copyright = "2000-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -346,7 +342,7 @@ process_arguments (int argc, char **argv) community = strscpy (community, optarg); break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -387,7 +383,7 @@ validate_arguments (void) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_http.c b/plugins/check_http.c index 0d499d93..f4a7e5e6 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_http plugin @@ -30,14 +28,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ /* splint -I. -I../../plugins -I../../lib/ -I/usr/kerberos/include/ ../../plugins/check_http.c */ const char *progname = "check_http"; -const char *revision = "$Revision$"; const char *copyright = "1999-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -144,8 +140,8 @@ main (int argc, char **argv) /* Set default URL. Must be malloced for subsequent realloc if --onredirect=follow */ server_url = strdup(HTTP_URL); server_url_length = strlen(server_url); - asprintf (&user_agent, "User-Agent: check_http/%s (nagios-plugins %s)", - clean_revstring (revision), VERSION); + asprintf (&user_agent, "User-Agent: check_http/v%s (nagios-plugins %s)", + NP_VERSION, VERSION); /* Parse extra opts if any */ argv=np_extra_opts (&argc, argv, progname); @@ -242,7 +238,7 @@ process_arguments (int argc, char **argv) exit (STATE_OK); break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); break; case 't': /* timeout period */ @@ -1271,7 +1267,7 @@ char *perfd_size (int page_len) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_ide_smart.c b/plugins/check_ide_smart.c index b0a7ef6c..b0b01890 100644 --- a/plugins/check_ide_smart.c +++ b/plugins/check_ide_smart.c @@ -9,8 +9,6 @@ * Copyright (c) 2000 Robert Dale * Copyright (c) 2000-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_ide_smart plugin @@ -32,12 +30,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_ide_smart"; -const char *revision = "$Revision$"; const char *copyright = "1998-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -211,7 +207,7 @@ main (int argc, char *argv[]) print_help (); return STATE_OK; case 'V': - print_revision (progname, revision); + print_revision (progname, NP_VERSION); return STATE_OK; default: usage5 (); @@ -481,7 +477,7 @@ smart_read_thresholds (int fd, thresholds_t * thresholds) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Nagios feature - 1999 Robert Dale \n"); printf ("(C) 1999 Ragnar Hojland Espinosa \n"); diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c index d0134a09..7ef4509c 100644 --- a/plugins/check_ldap.c +++ b/plugins/check_ldap.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_ldap plugin @@ -25,13 +23,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ /* progname may be check_ldaps */ char *progname = "check_ldap"; -const char *revision = "$Revision$"; const char *copyright = "2000-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -289,7 +285,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 't': /* timeout period */ if (!is_intnonneg (optarg)) @@ -390,7 +386,7 @@ print_help (void) char *myport; asprintf (&myport, "%d", DEFAULT_PORT); - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)\n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_load.c b/plugins/check_load.c index 5ff9a8c0..940d37ec 100644 --- a/plugins/check_load.c +++ b/plugins/check_load.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_load plugin @@ -27,12 +25,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_load"; -const char *revision = "$Revision$"; const char *copyright = "1999-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -245,7 +241,7 @@ process_arguments (int argc, char **argv) take_into_account_cpus = 1; break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -298,7 +294,7 @@ validate_arguments (void) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Felipe Gustavo de Almeida \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c index a0bdbeba..550326b1 100644 --- a/plugins/check_mrtg.c +++ b/plugins/check_mrtg.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_mrtg plugin @@ -28,12 +26,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_mrtg"; -const char *revision = "$Revision$"; const char *copyright = "1999-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -237,7 +233,7 @@ process_arguments (int argc, char **argv) units = optarg; break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -317,7 +313,7 @@ validate_arguments (void) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_mrtgtraf.c b/plugins/check_mrtgtraf.c index 1911d568..3232f1e7 100644 --- a/plugins/check_mrtgtraf.c +++ b/plugins/check_mrtgtraf.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_mtrgtraf plugin @@ -28,7 +26,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ @@ -36,7 +33,6 @@ #include "utils.h" const char *progname = "check_mrtgtraf"; -const char *revision = "$Revision$"; const char *copyright = "1999-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -273,7 +269,7 @@ process_arguments (int argc, char **argv) &outgoing_warning_threshold); break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -331,7 +327,7 @@ validate_arguments (void) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 77f3b89b..a1a63769 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c @@ -7,8 +7,6 @@ * Copyright (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net) * Copyright (c) 1999-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_mysql plugin @@ -29,12 +27,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_mysql"; -const char *revision = "$Revision$"; const char *copyright = "1999-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -310,7 +306,7 @@ process_arguments (int argc, char **argv) critical = optarg; break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -377,7 +373,7 @@ print_help (void) char *myport; asprintf (&myport, "%d", MYSQL_PORT); - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf (_(COPYRIGHT), copyright, email); diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c index a92b8570..802e3456 100644 --- a/plugins/check_mysql_query.c +++ b/plugins/check_mysql_query.c @@ -6,8 +6,6 @@ * Copyright (c) 2006-2007 Nagios Plugins Development Team * Original code from check_mysql, copyright 1999 Didi Rieder * -* Last Modified: $Date$ -* * Description: * * This file contains the check_mysql_query plugin @@ -28,12 +26,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_mysql_query"; -const char *revision = "$Revision$"; const char *copyright = "1999-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -231,7 +227,7 @@ process_arguments (int argc, char **argv) verbose++; break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -286,7 +282,7 @@ print_help (void) char *myport; asprintf (&myport, "%d", MYSQL_PORT); - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf (_(COPYRIGHT), copyright, email); diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c index a2debe21..954ff711 100644 --- a/plugins/check_nagios.c +++ b/plugins/check_nagios.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_nagios plugin @@ -31,12 +29,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_nagios"; -const char *revision = "$Revision$"; const char *copyright = "1999-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -240,7 +236,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'F': /* status log */ status_log = optarg; @@ -278,7 +274,7 @@ process_arguments (int argc, char **argv) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf (_(COPYRIGHT), copyright, email); diff --git a/plugins/check_nt.c b/plugins/check_nt.c index a0e5c119..4d9157a6 100644 --- a/plugins/check_nt.c +++ b/plugins/check_nt.c @@ -6,8 +6,6 @@ * Copyright (c) 2000-2002 Yves Rubin (rubiyz@yahoo.com) * Copyright (c) 2003-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_nt plugin @@ -31,12 +29,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_nt"; -const char *revision = "$Revision$"; const char *copyright = "2000-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -517,7 +513,7 @@ int process_arguments(int argc, char **argv){ print_help(); exit(STATE_OK); case 'V': /* version */ - print_revision(progname,revision); + print_revision(progname, NP_VERSION); exit(STATE_OK); case 'H': /* hostname */ if (server_address) free(server_address); @@ -637,7 +633,7 @@ void preparelist(char *string) { void print_help(void) { - print_revision(progname,revision); + print_revision(progname, NP_VERSION); printf ("Copyright (c) 2000 Yves Rubin (rubiyz@yahoo.com)\n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c index 20ecf64f..ada7f0c3 100644 --- a/plugins/check_ntp.c +++ b/plugins/check_ntp.c @@ -6,8 +6,6 @@ * Copyright (c) 2006 Sean Finney * Copyright (c) 2006-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_ntp plugin @@ -29,12 +27,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_ntp"; -const char *revision = "$Revision$"; const char *copyright = "2006-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -682,7 +678,7 @@ int process_arguments(int argc, char **argv){ exit(STATE_OK); break; case 'V': - print_revision(progname, revision); + print_revision(progname, NP_VERSION); exit(STATE_OK); break; case 'v': @@ -836,7 +832,7 @@ int main(int argc, char *argv[]){ void print_help(void){ - print_revision(progname, revision); + print_revision(progname, NP_VERSION); printf ("Copyright (c) 2006 Sean Finney\n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c index 17876dd8..acca17b5 100644 --- a/plugins/check_ntp_peer.c +++ b/plugins/check_ntp_peer.c @@ -6,8 +6,6 @@ * Copyright (c) 2006 Sean Finney * Copyright (c) 2006-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_ntp_peer plugin @@ -34,12 +32,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_ntp_peer"; -const char *revision = "$Revision$"; const char *copyright = "2006-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -492,7 +488,7 @@ int process_arguments(int argc, char **argv){ exit(STATE_OK); break; case 'V': - print_revision(progname, revision); + print_revision(progname, NP_VERSION); exit(STATE_OK); break; case 'v': @@ -671,7 +667,7 @@ int main(int argc, char *argv[]){ void print_help(void){ - print_revision(progname, revision); + print_revision(progname, NP_VERSION); printf ("Copyright (c) 2006 Sean Finney\n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c index a5b122f3..c7c7a754 100644 --- a/plugins/check_ntp_time.c +++ b/plugins/check_ntp_time.c @@ -6,8 +6,6 @@ * Copyright (c) 2006 Sean Finney * Copyright (c) 2006-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_ntp_time plugin @@ -33,12 +31,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_ntp_time"; -const char *revision = "$Revision$"; const char *copyright = "2006-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -476,7 +472,7 @@ int process_arguments(int argc, char **argv){ exit(STATE_OK); break; case 'V': - print_revision(progname, revision); + print_revision(progname, NP_VERSION); exit(STATE_OK); break; case 'v': @@ -594,7 +590,7 @@ int main(int argc, char *argv[]){ } void print_help(void){ - print_revision(progname, revision); + print_revision(progname, NP_VERSION); printf ("Copyright (c) 2006 Sean Finney\n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c index c0e5ece9..72a47b16 100644 --- a/plugins/check_nwstat.c +++ b/plugins/check_nwstat.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_nwstat plugin @@ -28,12 +26,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_nwstat"; -const char *revision = "$Revision$"; const char *copyright = "2000-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -1360,7 +1356,7 @@ int process_arguments(int argc, char **argv) { print_help(); exit(STATE_OK); case 'V': /* version */ - print_revision(progname, revision); + print_revision(progname, NP_VERSION); exit(STATE_OK); case 'H': /* hostname */ server_address=optarg; @@ -1597,7 +1593,7 @@ void print_help(void) char *myport; asprintf (&myport, "%d", PORT); - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_overcr.c b/plugins/check_overcr.c index af04d3b4..1d9ec8cf 100644 --- a/plugins/check_overcr.c +++ b/plugins/check_overcr.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_overcr plugin @@ -28,12 +26,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_overcr"; -const char *revision = "$Revision$"; const char *copyright = "2000-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -346,7 +342,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'H': /* hostname */ server_address = optarg; @@ -415,7 +411,7 @@ print_help (void) char *myport; asprintf (&myport, "%d", PORT); - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c index 869ef673..abe721bf 100644 --- a/plugins/check_pgsql.c +++ b/plugins/check_pgsql.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_pgsql plugin @@ -27,12 +25,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_pgsql"; -const char *revision = "$Revision$"; const char *copyright = "1999-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -231,7 +227,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 't': /* timeout period */ if (!is_integer (optarg)) @@ -404,7 +400,7 @@ print_help (void) asprintf (&myport, "%d", DEFAULT_PORT); - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_ping.c b/plugins/check_ping.c index c457ad64..8c4c0e64 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_ping plugin @@ -27,12 +25,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_ping"; -const char *revision = "$Revision$"; const char *copyright = "2000-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -231,7 +227,7 @@ process_arguments (int argc, char **argv) exit (STATE_OK); break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); break; case 't': /* timeout period */ @@ -555,7 +551,7 @@ error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_procs.c b/plugins/check_procs.c index 4aaeddb2..4c729501 100644 --- a/plugins/check_procs.c +++ b/plugins/check_procs.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_procs plugin @@ -30,13 +28,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_procs"; const char *program_name = "check_procs"; /* Required for coreutils libs */ -const char *revision = "$Revision$"; const char *copyright = "2000-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -361,7 +357,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 't': /* timeout period */ if (!is_integer (optarg)) @@ -674,7 +670,7 @@ convert_to_seconds(char *etime) { void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_radius.c b/plugins/check_radius.c index e0b0e2c2..98f6bf98 100644 --- a/plugins/check_radius.c +++ b/plugins/check_radius.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_radius plugin @@ -27,12 +25,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_radius"; -const char *revision = "$Revision$"; const char *copyright = "2000-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -239,7 +235,7 @@ process_arguments (int argc, char **argv) print_help (); exit (OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (OK); case 'v': /* verbose mode */ verbose = TRUE; @@ -312,7 +308,7 @@ print_help (void) char *myport; asprintf (&myport, "%d", PW_AUTH_UDP_PORT); - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Robert August Vincent II\n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_real.c b/plugins/check_real.c index d333c2a3..cbc3103c 100644 --- a/plugins/check_real.c +++ b/plugins/check_real.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_real plugin @@ -27,12 +25,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_real"; -const char *revision = "$Revision$"; const char *copyright = "2000-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -361,7 +357,7 @@ process_arguments (int argc, char **argv) } break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -409,7 +405,7 @@ print_help (void) char *myport; asprintf (&myport, "%d", PORT); - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Pedro Leite \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index 4986fe65..6040aa12 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_smtp plugin @@ -27,12 +25,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_smtp"; -const char *revision = "$Revision$"; const char *copyright = "2000-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -620,7 +616,7 @@ process_arguments (int argc, char **argv) #endif break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -762,7 +758,7 @@ print_help (void) char *myport; asprintf (&myport, "%d", SMTP_PORT); - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999-2001 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index 0aafd951..1c92534c 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_snmp plugin @@ -27,12 +25,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_snmp"; -const char *revision = "$Revision$"; const char *copyright = "1999-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -475,7 +471,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'v': /* verbose */ verbose = TRUE; @@ -928,7 +924,7 @@ nextarg (char *str) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index 2e16e651..04cc4d97 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_ssh plugin @@ -27,12 +25,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_ssh"; -const char *revision = "$Revision$"; const char *copyright = "2000-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -129,7 +125,7 @@ process_arguments (int argc, char **argv) case '?': /* help */ usage5 (); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -218,9 +214,7 @@ ssh_connect (char *haddr, int hport, char *remote_version) char *buffer = NULL; char *ssh_proto = NULL; char *ssh_server = NULL; - char rev_no[20]; - - sscanf ("$Revision$", "$Revision: %[0123456789.]", rev_no); + static char *rev_no = VERSION; result = my_tcp_connect (haddr, hport, &sd); @@ -272,7 +266,7 @@ print_help (void) char *myport; asprintf (&myport, "%d", SSH_DFL_PORT); - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Remi Paulmier \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_swap.c b/plugins/check_swap.c index f0269633..be20ca32 100644 --- a/plugins/check_swap.c +++ b/plugins/check_swap.c @@ -6,8 +6,6 @@ * Copyright (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net) * Copyright (c) 2000-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_disk plugin @@ -26,12 +24,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_swap"; -const char *revision = "$Revision$"; const char *copyright = "2000-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -463,7 +459,7 @@ process_arguments (int argc, char **argv) verbose++; break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -522,7 +518,7 @@ validate_arguments (void) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf (_(COPYRIGHT), copyright, email); diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 0d81497e..31659f18 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_tcp plugin @@ -31,7 +29,6 @@ /* progname "check_tcp" changes depending on symlink called */ char *progname; -const char *revision = "$Revision$"; const char *copyright = "1999-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -451,7 +448,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'v': /* verbose mode */ flags |= FLAG_VERBOSE; @@ -592,7 +589,7 @@ process_arguments (int argc, char **argv) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_time.c b/plugins/check_time.c index f9a292c0..ee938168 100644 --- a/plugins/check_time.c +++ b/plugins/check_time.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_time plugin @@ -27,12 +25,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_time"; -const char *revision = "$Revision$"; const char *copyright = "1999-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -237,7 +233,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'H': /* hostname */ if (is_host (optarg) == FALSE) @@ -335,7 +331,7 @@ print_help (void) char *myport; asprintf (&myport, "%d", TIME_PORT); - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad\n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/check_ups.c b/plugins/check_ups.c index a498d203..7311ca23 100644 --- a/plugins/check_ups.c +++ b/plugins/check_ups.c @@ -8,8 +8,6 @@ * 2004 Arnaud Quette * Copyright (c) 2002-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains Network UPS Tools plugin for Nagios @@ -31,12 +29,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_ups"; -const char *revision = "$Revision$"; const char *copyright = "2000-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -561,7 +557,7 @@ process_arguments (int argc, char **argv) } break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -601,7 +597,7 @@ print_help (void) char *myport; asprintf (&myport, "%d", PORT); - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 2000 Tom Shields\n"); printf ("Copyright (c) 2004 Alain Richard \n"); diff --git a/plugins/check_users.c b/plugins/check_users.c index 4e7e9a29..1bd2c8b2 100644 --- a/plugins/check_users.c +++ b/plugins/check_users.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_users plugin @@ -29,12 +27,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "check_users"; -const char *revision = "$Revision$"; const char *copyright = "2000-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -163,7 +159,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'c': /* critical */ if (!is_intnonneg (optarg)) @@ -203,7 +199,7 @@ process_arguments (int argc, char **argv) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad\n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/common.h b/plugins/common.h index 0711dbf1..dfc09416 100644 --- a/plugins/common.h +++ b/plugins/common.h @@ -6,8 +6,6 @@ * Copyright (c) 1999 Ethan Galstad (nagios@nagios.org) * Copyright (c) 2003-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains common include files and defines used in many of @@ -27,7 +25,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/plugins/negate.c b/plugins/negate.c index 40ff1912..0808b685 100644 --- a/plugins/negate.c +++ b/plugins/negate.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2002-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the negate plugin @@ -28,12 +26,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "negate"; -const char *revision = "$Revision$"; const char *copyright = "2002-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -155,7 +151,7 @@ process_arguments (int argc, char **argv) exit (EXIT_SUCCESS); break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (EXIT_SUCCESS); case 't': /* timeout period */ if (!is_integer (optarg)) @@ -233,7 +229,7 @@ translate_state (char *state_text) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf (COPYRIGHT, copyright, email); diff --git a/plugins/netutils.c b/plugins/netutils.c index 1a5547e9..6082cae0 100644 --- a/plugins/netutils.c +++ b/plugins/netutils.c @@ -6,8 +6,6 @@ * Copyright (c) 1999 Ethan Galstad (nagios@nagios.org) * Copyright (c) 2003-2008 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains commons functions used in many of the plugins. @@ -26,7 +24,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/plugins/netutils.h b/plugins/netutils.h index 4c0a563c..85c92fc0 100644 --- a/plugins/netutils.h +++ b/plugins/netutils.h @@ -6,8 +6,6 @@ * Copyright (c) 1999 Ethan Galstad (nagios@nagios.org) * Copyright (c) 2003-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains common include files and function definitions @@ -27,7 +25,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/plugins/popen.c b/plugins/popen.c index a27aecc9..716bd524 100644 --- a/plugins/popen.c +++ b/plugins/popen.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2005-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * A safe alternative to popen @@ -37,7 +35,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/plugins/popen.h b/plugins/popen.h index 8b09edd9..fc7e78e2 100644 --- a/plugins/popen.h +++ b/plugins/popen.h @@ -1,6 +1,5 @@ /****************************************************************************** * -* $Id$ * *****************************************************************************/ diff --git a/plugins/runcmd.c b/plugins/runcmd.c index 8c52b5c9..7574b121 100644 --- a/plugins/runcmd.c +++ b/plugins/runcmd.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2005-2006 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description : * * A simple interface to executing programs from other programs, using an @@ -35,7 +33,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/plugins/runcmd.h b/plugins/runcmd.h index a048def3..211dee2c 100644 --- a/plugins/runcmd.h +++ b/plugins/runcmd.h @@ -18,7 +18,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/plugins/sslutils.c b/plugins/sslutils.c index 3d4f9016..f5035e23 100644 --- a/plugins/sslutils.c +++ b/plugins/sslutils.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2005-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains common functions for plugins that require SSL. @@ -25,7 +23,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/plugins/t/check_by_ssh.t b/plugins/t/check_by_ssh.t index b421d334..5f2c534d 100644 --- a/plugins/t/check_by_ssh.t +++ b/plugins/t/check_by_ssh.t @@ -2,7 +2,6 @@ # # check_by_ssh tests # -# $Id$ # use strict; diff --git a/plugins/t/check_cluster.t b/plugins/t/check_cluster.t index f3e78b83..4736f067 100644 --- a/plugins/t/check_cluster.t +++ b/plugins/t/check_cluster.t @@ -2,7 +2,6 @@ # # check_cluster tests # -# $Id$ # use strict; diff --git a/plugins/t/check_dig.t b/plugins/t/check_dig.t index 937eec33..323859e8 100644 --- a/plugins/t/check_dig.t +++ b/plugins/t/check_dig.t @@ -2,7 +2,6 @@ # # Domain Name Server (DNS) Tests via check_dig # -# $Id$ # use strict; diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t index 99c434ac..45c6a613 100644 --- a/plugins/t/check_disk.t +++ b/plugins/t/check_disk.t @@ -2,7 +2,6 @@ # # Disk Space Tests via check_disk # -# $Id$ # # TODO: Add in tests for perf data. Need to beef up Nagios::Plugin::Performance to cater for max, min, etc diff --git a/plugins/t/check_dns.t b/plugins/t/check_dns.t index fc89e6e5..64aaf0ce 100644 --- a/plugins/t/check_dns.t +++ b/plugins/t/check_dns.t @@ -2,7 +2,6 @@ # # Domain Name Server (DNS) Tests via check_dns # -# $Id$ # use strict; diff --git a/plugins/t/check_dummy.t b/plugins/t/check_dummy.t index aaa7a410..15fc1578 100644 --- a/plugins/t/check_dummy.t +++ b/plugins/t/check_dummy.t @@ -2,7 +2,6 @@ # # check_dummy tests # -# $Id$ # use strict; diff --git a/plugins/t/check_fping.t b/plugins/t/check_fping.t index c59d59e0..45a9be8a 100644 --- a/plugins/t/check_fping.t +++ b/plugins/t/check_fping.t @@ -2,7 +2,6 @@ # # FPing Tests via check_fping # -# $Id$ # use strict; diff --git a/plugins/t/check_ftp.t b/plugins/t/check_ftp.t index 47a73e13..de6831ba 100644 --- a/plugins/t/check_ftp.t +++ b/plugins/t/check_ftp.t @@ -2,7 +2,6 @@ # # File Transfer Protocol (FTP) Test via check_ftp # -# $Id$ # use strict; diff --git a/plugins/t/check_hpjd.t b/plugins/t/check_hpjd.t index 2fe56000..10ded54a 100644 --- a/plugins/t/check_hpjd.t +++ b/plugins/t/check_hpjd.t @@ -2,7 +2,6 @@ # # HP JetDirect Test via check_hpjd # -# $Id$ # use strict; diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t index c98b4ac3..c43a64a9 100644 --- a/plugins/t/check_http.t +++ b/plugins/t/check_http.t @@ -2,7 +2,6 @@ # # HyperText Transfer Protocol (HTTP) Test via check_http # -# $Id$ # use strict; diff --git a/plugins/t/check_imap.t b/plugins/t/check_imap.t index fa957d1b..9c6eae1f 100644 --- a/plugins/t/check_imap.t +++ b/plugins/t/check_imap.t @@ -2,7 +2,6 @@ # # Internet Mail Access Protocol (IMAP) Server Tests via check_imap # -# $Id$ # use strict; diff --git a/plugins/t/check_jabber.t b/plugins/t/check_jabber.t index 6a3d4ef7..1aaf8125 100644 --- a/plugins/t/check_jabber.t +++ b/plugins/t/check_jabber.t @@ -2,7 +2,6 @@ # # Jabber Server Tests via check_jabber # -# $Id$ # use strict; diff --git a/plugins/t/check_load.t b/plugins/t/check_load.t index 8987b84c..55f6f752 100644 --- a/plugins/t/check_load.t +++ b/plugins/t/check_load.t @@ -2,7 +2,6 @@ # # Load Average Tests via check_load # -# $Id$ # use strict; diff --git a/plugins/t/check_mysql.t b/plugins/t/check_mysql.t index e8bccf1c..d9716458 100644 --- a/plugins/t/check_mysql.t +++ b/plugins/t/check_mysql.t @@ -2,7 +2,6 @@ # # MySQL Database Server Tests via check_mysql # -# $Id$ # # # These are the database permissions required for this test: diff --git a/plugins/t/check_mysql_query.t b/plugins/t/check_mysql_query.t index f78f07b8..407af881 100644 --- a/plugins/t/check_mysql_query.t +++ b/plugins/t/check_mysql_query.t @@ -2,7 +2,6 @@ # # MySQL Database Server Tests via check_mysql # -# $Id$ # # # These are the database permissions required for this test: diff --git a/plugins/t/check_nagios.t b/plugins/t/check_nagios.t index d5d48465..81fc24d8 100644 --- a/plugins/t/check_nagios.t +++ b/plugins/t/check_nagios.t @@ -2,7 +2,6 @@ # # check_nagios tests # -# $Id$ # use strict; diff --git a/plugins/t/check_ntp.t b/plugins/t/check_ntp.t index 4f86ab97..b71c8631 100644 --- a/plugins/t/check_ntp.t +++ b/plugins/t/check_ntp.t @@ -2,7 +2,6 @@ # # Testing NTP # -# $Id$ # use strict; diff --git a/plugins/t/check_ping.t b/plugins/t/check_ping.t index c9a09041..e1c119e4 100644 --- a/plugins/t/check_ping.t +++ b/plugins/t/check_ping.t @@ -2,7 +2,6 @@ # # Ping Response Tests via check_ping # -# $Id$ # use strict; diff --git a/plugins/t/check_pop.t b/plugins/t/check_pop.t index b78291da..62352fd1 100644 --- a/plugins/t/check_pop.t +++ b/plugins/t/check_pop.t @@ -2,7 +2,6 @@ # # Post Office Protocol (POP) Server Tests via check_pop # -# $Id$ # use strict; diff --git a/plugins/t/check_procs.t b/plugins/t/check_procs.t index 2a41ac5c..fc32952d 100644 --- a/plugins/t/check_procs.t +++ b/plugins/t/check_procs.t @@ -2,7 +2,6 @@ # # Process Tests via check_procs # -# $Id$ # use strict; diff --git a/plugins/t/check_smtp.t b/plugins/t/check_smtp.t index ff58bc0b..aa6dae45 100644 --- a/plugins/t/check_smtp.t +++ b/plugins/t/check_smtp.t @@ -2,7 +2,6 @@ # # Simple Mail Transfer Protocol (SMTP) Test via check_smtp # -# $Id$ # use strict; diff --git a/plugins/t/check_snmp.t b/plugins/t/check_snmp.t index 4e831397..369314ec 100644 --- a/plugins/t/check_snmp.t +++ b/plugins/t/check_snmp.t @@ -2,7 +2,6 @@ # # Simple Network Management Protocol (SNMP) Test via check_snmp # -# $Id$ # use strict; diff --git a/plugins/t/check_swap.t b/plugins/t/check_swap.t index 435730fc..e44adc90 100644 --- a/plugins/t/check_swap.t +++ b/plugins/t/check_swap.t @@ -2,7 +2,6 @@ # # Swap Space Tests via check_swap # -# $Id$ # use strict; diff --git a/plugins/t/check_tcp.t b/plugins/t/check_tcp.t index 2914350e..fd2b5dd9 100644 --- a/plugins/t/check_tcp.t +++ b/plugins/t/check_tcp.t @@ -2,7 +2,6 @@ # # TCP Connection Based Tests via check_tcp # -# $Id$ # use strict; diff --git a/plugins/t/check_time.t b/plugins/t/check_time.t index f7fcf959..961f56e6 100644 --- a/plugins/t/check_time.t +++ b/plugins/t/check_time.t @@ -2,7 +2,6 @@ # # System Time Tests via check_time # -# $Id$ # use strict; diff --git a/plugins/t/check_udp.t b/plugins/t/check_udp.t index e8a1e394..6d24675a 100644 --- a/plugins/t/check_udp.t +++ b/plugins/t/check_udp.t @@ -2,7 +2,6 @@ # # UDP Connection Based Tests via check_udp # -# $Id$ # use strict; diff --git a/plugins/t/check_users.t b/plugins/t/check_users.t index 4b313d30..cf7fac92 100644 --- a/plugins/t/check_users.t +++ b/plugins/t/check_users.t @@ -2,7 +2,6 @@ # # Logged in Users Tests via check_users # -# $Id$ # use strict; diff --git a/plugins/t/negate.t b/plugins/t/negate.t index 3a894f55..989bf01f 100644 --- a/plugins/t/negate.t +++ b/plugins/t/negate.t @@ -3,8 +3,6 @@ # negate checks # Need check_dummy to work for testing # -# $Id: negate.pl 1717 2007-05-24 08:53:50Z tonvoon $ -# use strict; use Test::More; diff --git a/plugins/urlize.c b/plugins/urlize.c index aeabafd0..a3620082 100644 --- a/plugins/urlize.c +++ b/plugins/urlize.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2000-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the urlize plugin @@ -29,12 +27,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ const char *progname = "urlize"; -const char *revision = "$Revision$"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -89,7 +85,7 @@ main (int argc, char **argv) exit (EXIT_SUCCESS); break; case 'V': /* version */ - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (EXIT_SUCCESS); break; case 'u': @@ -165,7 +161,7 @@ main (int argc, char **argv) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 2000 Karl DeBisschop \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins/utils.c b/plugins/utils.c index c8f3a00d..1900ef86 100644 --- a/plugins/utils.c +++ b/plugins/utils.c @@ -6,9 +6,6 @@ * Copyright (c) 2000 Karl DeBisschop (karl@debisschop.net) * Copyright (c) 2002-2007 Nagios Plugin Development Team * -* Last Modified: $Date$ -* -* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -22,7 +19,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ @@ -142,24 +138,13 @@ usage5 (void) exit (STATE_UNKNOWN); } -char * -clean_revstring (const char *revstring) -{ - char plugin_revision[STRLEN]; - plugin_revision[0] = 'v'; - if (sscanf (revstring,"$Revision: %[0-9.]", plugin_revision + 1) == 1) - return strscpy (NULL, plugin_revision); - else - return strscpy (NULL, "N/A"); -} - void -print_revision (const char *command_name, const char *revision_string) +print_revision (const char *command_name, const char *revision) { char plugin_revision[STRLEN]; - printf ("%s %s (%s %s)\n", - command_name, clean_revstring(revision_string), PACKAGE, VERSION); + printf ("%s v%s (%s %s)\n", + command_name, revision, PACKAGE, VERSION); } const char * diff --git a/plugins/utils.h b/plugins/utils.h index 67e099d4..65e06ebd 100644 --- a/plugins/utils.h +++ b/plugins/utils.h @@ -26,10 +26,7 @@ suite of plugins. */ /* Standardize version information, termination */ -/* $Id$ */ - void support (void); -char *clean_revstring (const char *); void print_revision (const char *, const char *); /* Handle timeouts */ -- cgit v1.2.3