From 6fbd14fea5c111a23d9074d25499991cbfa58f79 Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Sun, 23 Nov 2008 05:38:47 +0000 Subject: [PATCH] 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 --- BRANCHES | 9 -- Makefile.am | 5 +- NP-VERSION-GEN | 46 +++++++ NPTest.pm | 2 +- acinclude.m4 | 1 - autogen.sh | 2 - command.cfg.in | 2 - configure.in | 1 - contrib/check_adptraid.sh | 2 +- contrib/check_apc_ups.pl | 4 +- contrib/check_appletalk.pl | 6 +- contrib/check_arping.pl | 4 +- contrib/check_email_loop.pl | 2 +- contrib/check_fan_cpq_present | 4 +- contrib/check_fan_fsc_present | 4 +- contrib/check_frontpage | 6 +- contrib/check_http-with-client-certificate.c | 2 +- contrib/check_hw.sh | 2 +- contrib/check_ica_master_browser.pl | 7 +- contrib/check_ica_metaframe_pub_apps.pl | 7 +- contrib/check_ica_program_neigbourhood.pl | 7 +- contrib/check_inodes-freebsd.pl | 4 +- contrib/check_javaproc.pl | 2 +- contrib/check_joy.sh | 2 +- contrib/check_log2.pl | 4 +- contrib/check_lotus.pl | 7 +- contrib/check_mem.pl | 2 +- contrib/check_ms_spooler.pl | 7 +- contrib/check_ora_table_space.pl | 4 +- contrib/check_oracle_instance.pl | 4 +- contrib/check_oracle_tbs | 2 +- contrib/check_pfstate | 4 +- contrib/check_rbl.c | 8 +- contrib/check_smb.sh | 2 +- contrib/check_snmp_disk_monitor.pl | 2 +- contrib/check_snmp_printer.pl | 4 +- contrib/check_snmp_process_monitor.pl | 2 +- contrib/check_snmp_procs.pl | 4 +- contrib/check_temp_cpq | 4 +- contrib/check_temp_fsc | 4 +- contrib/check_traceroute.pl | 7 +- contrib/check_uptime.c | 4 +- contrib/check_vcs.pl | 2 +- contrib/check_wins.pl | 7 +- contrib/packet_utils.pm | 3 +- contrib/utils.py | 2 +- doc/BRANCHING | 10 -- doc/developer-guidelines.sgml | 4 +- lib/extra_opts.c | 5 - lib/parse_ini.c | 4 - lib/tests/test_base64.c | 1 - lib/tests/test_cmd.c | 1 - lib/tests/test_disk.c | 1 - lib/tests/test_ini.c | 1 - lib/tests/test_opts.c | 2 - lib/tests/test_tcp.c | 1 - lib/tests/test_utils.c | 1 - lib/utils_base.c | 3 - lib/utils_cmd.c | 3 - lib/utils_disk.c | 3 - lib/utils_tcp.c | 3 - plugins-root/Makefile.am | 13 ++ plugins-root/check_dhcp.c | 8 +- plugins-root/check_icmp.c | 8 +- plugins-root/t/check_icmp.t | 2 - plugins-scripts/Makefile.am | 13 ++ plugins-scripts/check_breeze.pl | 4 +- plugins-scripts/check_disk_smb.pl | 5 +- plugins-scripts/check_file_age.pl | 5 +- plugins-scripts/check_flexlm.pl | 5 +- plugins-scripts/check_ifoperstatus.pl | 5 +- plugins-scripts/check_ifstatus.pl | 5 +- plugins-scripts/check_ircd.pl | 5 +- plugins-scripts/check_log.sh | 2 +- plugins-scripts/check_mailq.pl | 5 +- plugins-scripts/check_mssql.pl | 3 +- plugins-scripts/check_netdns.pl | 1 - plugins-scripts/check_ntp.pl | 5 +- plugins-scripts/check_oracle.sh | 2 +- plugins-scripts/check_rpc.pl | 18 ++- plugins-scripts/check_sensors.sh | 2 +- plugins-scripts/check_wave.pl | 5 +- plugins-scripts/subst.in | 3 + plugins-scripts/t/check_file_age.t | 1 - plugins-scripts/t/check_rpc.t | 1 - plugins-scripts/t/utils.t | 1 - plugins-scripts/utils.pm.in | 3 - 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 - test.pl.in | 2 - tools/README | 1 - tools/git2svn.pl | 129 +++++++++++++++++++ tools/mini_epn.c | 2 - tools/setup | 1 - tools/tinderbox_build | 2 +- 172 files changed, 419 insertions(+), 531 deletions(-) delete mode 100644 BRANCHES create mode 100755 NP-VERSION-GEN delete mode 100644 doc/BRANCHING mode change 100644 => 100755 plugins-scripts/check_ifoperstatus.pl create mode 100755 tools/git2svn.pl diff --git a/BRANCHES b/BRANCHES deleted file mode 100644 index b1e8576..0000000 --- a/BRANCHES +++ /dev/null @@ -1,9 +0,0 @@ -# $Id$ -# -# This file describes the current branches in CVS for nagiosplug -# Used by sfsnapshot to generate the snapshots -# -# Format: -# cvs_branch_name:description -HEAD:Stable - 1.4.x releases -r1_4-patches:Testing multiple branches diff --git a/Makefile.am b/Makefile.am index 0452133..3cd939a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ SUBDIRS = gl @INCLUDE_TAP_DIR@ lib plugins plugins-scripts plugins-root po @PERL # Have to list TAP_DIR manually to get in distribution EXTRA_DIST = config.rpath \ ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CODING FAQ LEGAL NEWS \ - REQUIREMENTS SUPPORT THANKS \ + NP-VERSION-GEN REQUIREMENTS SUPPORT THANKS \ NPTest.pm contrib pkg nagios-plugins.spec \ config_test/Makefile config_test/run_tests config_test/child_test.c \ perlmods tools/build_perl_modules \ @@ -19,7 +19,7 @@ DEFS = -DLOCALEDIR=\"$(localedir)\" dist-hook: make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec - rm -rf `find $(distdir) -name .svn` + echo ${VERSION} >$(distdir)/version install-root: cd plugins-root && $(MAKE) $@ @@ -62,3 +62,4 @@ THANKS: THANKS.in pkgclean: rm -rf $(BUILDDIR) $(PACKDIR) + diff --git a/NP-VERSION-GEN b/NP-VERSION-GEN new file mode 100755 index 0000000..1169710 --- /dev/null +++ b/NP-VERSION-GEN @@ -0,0 +1,46 @@ +#!/bin/sh +# +# This is from the Git repository (GIT-VERSION-GEN with modifications) +# + +SRC_ROOT=`dirname $0` + +NPVF=NP-VERSION-FILE +DEF_VER=1.4.13.git + +LF=' +' + +# First see if there is a version file (included in release tarballs), +# then try git-describe, then default. +if test -f $SRC_ROOT/version +then + VN=`cat $SRC_ROOT/version` || VN="$DEF_VER" +elif test -d $SRC_ROOT/.git -o -f $SRC_ROOT/.git && + VN=`cd $SRC_ROOT; git describe --abbrev=4 HEAD 2>/dev/null` && + case "$VN" in + *$LF*) (exit 1) ;; + release-[0-9]*) + git update-index -q --refresh + test -z "`git diff-index --name-only HEAD --`" || + VN="$VN-dirty" ;; + esac +then + VN=`echo "$VN" | sed -e 's/^release-//' | sed -e 's/-/./g'`; +else + VN="$DEF_VER" +fi + +VN=`expr "$VN" : v*'\(.*\)'` + +if test -r $NPVF +then + VC=`sed -e 's/^NP_VERSION = //' <$NPVF` +else + VC=unset +fi +test "$VN" = "$VC" || { + echo >&2 "NP_VERSION = $VN" + echo "NP_VERSION = $VN" >$NPVF +} + diff --git a/NPTest.pm b/NPTest.pm index d4542dd..1cd89db 100644 --- a/NPTest.pm +++ b/NPTest.pm @@ -21,7 +21,7 @@ use Data::Dumper; use Test; use vars qw($VERSION); -$VERSION = do { my @r = (q$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; # must be all one line, for MakeMaker +$VERSION = "1556."; # must be all one line, for MakeMaker =head1 NAME diff --git a/acinclude.m4 b/acinclude.m4 index 7de6555..acee3e1 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -8,7 +8,6 @@ dnl e.g. 6 arguments (linux) dnl e.g. 5 arguments (solaris) dnl e.g. 3 arguments (osf/1) dnl -dnl @version $Id$ dnl @author Brian Stafford dnl dnl based on version by Caolan McNamara diff --git a/autogen.sh b/autogen.sh index 3bc484b..c584309 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,7 +1,5 @@ #!/bin/sh # -# $Id$ -# # Requires: automake, autoconf, dpkg-dev # set -e diff --git a/command.cfg.in b/command.cfg.in index 65b5f4e..aff33d2 100644 --- a/command.cfg.in +++ b/command.cfg.in @@ -1,8 +1,6 @@ ############################################################################### # COMMAND CONFIGURATION # -# $Id$ -# # SYNTAX: # command[]= # diff --git a/configure.in b/configure.in index 7687ae6..203166e 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,4 @@ dnl Process this file with autoconf to produce a configure script. -AC_REVISION ($Revision$) AC_PREREQ(2.59) AC_INIT(nagios-plugins,1.4.13) AC_CONFIG_SRCDIR(NPTest.pm) diff --git a/contrib/check_adptraid.sh b/contrib/check_adptraid.sh index d7f8d0c..e3c47be 100644 --- a/contrib/check_adptraid.sh +++ b/contrib/check_adptraid.sh @@ -13,7 +13,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin PROGNAME=`basename $0` PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` -REVISION=`echo '$Revision$' | sed -e 's/[^0-9.]//g'` +REVISION=`echo '$Revision: 302 $' | sed -e 's/[^0-9.]//g'` . $PROGPATH/utils.sh diff --git a/contrib/check_apc_ups.pl b/contrib/check_apc_ups.pl index 2b6990f..6bf1766 100644 --- a/contrib/check_apc_ups.pl +++ b/contrib/check_apc_ups.pl @@ -38,7 +38,7 @@ GetOptions "H=s" => \$opt_H, "hostname=s" => \$opt_H); if ($opt_V) { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'$Revision: 1771 $'); exit $ERRORS{'OK'}; } @@ -252,7 +252,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'$Revision: 1771 $'); print "Copyright (c) 2001 Gerald Combs/Jeffrey Blank/Karl DeBisschop This plugin reports the status of an APC UPS equipped with an SNMP management diff --git a/contrib/check_appletalk.pl b/contrib/check_appletalk.pl index 6df4c7a..9277686 100644 --- a/contrib/check_appletalk.pl +++ b/contrib/check_appletalk.pl @@ -9,7 +9,7 @@ # using "aecho" # # initial version: 23 October 2002 by Stefan Beck, IT Software Solutions -# current status: $Revision$ +# current status: $Revision: 1771 $ # # Copyright Notice: GPL # @@ -122,7 +122,7 @@ while () { } sub print_help() { - print_revision( $PROGNAME, '$Revision$ ' ); + print_revision( $PROGNAME, '$Revision: 1771 $ ' ); print "Copyright (c) 2002 Stefan Beck\n"; print "\n"; print "Check if an atalkhost responds to an atalk echo using\n"; @@ -159,7 +159,7 @@ sub print_usage () { } sub version () { - print_revision( $PROGNAME, '$Revision$ ' ); + print_revision( $PROGNAME, '$Revision: 1771 $ ' ); exit $ERRORS{'OK'}; } diff --git a/contrib/check_arping.pl b/contrib/check_arping.pl index b78ec68..c41c4a8 100644 --- a/contrib/check_arping.pl +++ b/contrib/check_arping.pl @@ -55,7 +55,7 @@ if ($status == 0) if ($opt_V) { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 1112 $ '); exit $ERRORS{'OK'}; } @@ -115,6 +115,6 @@ sub print_help { print " -t (--timeout) Timeout in seconds.\n"; print " -V (--version) Plugin version\n"; print " -h (--help) usage help \n\n"; - print_revision($PROGNAME, '$Revision$'); + print_revision($PROGNAME, '$Revision: 1112 $'); } diff --git a/contrib/check_email_loop.pl b/contrib/check_email_loop.pl index fb418ee..1b02ea3 100644 --- a/contrib/check_email_loop.pl +++ b/contrib/check_email_loop.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# $Id$ +# $Id: check_email_loop.pl 1290 2005-11-29 23:21:06Z harpermann $ # # (c)2000 Benjamin Schmid, blueshift@gmx.net (emergency use only ;-) # Copyleft by GNU GPL diff --git a/contrib/check_fan_cpq_present b/contrib/check_fan_cpq_present index 476a0c3..0bd1390 100644 --- a/contrib/check_fan_cpq_present +++ b/contrib/check_fan_cpq_present @@ -111,7 +111,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$\n '); + print_revision($PROGNAME,'$Revision: 1113 $\n '); print "Copyright (c) 2003 Rainer Duffner\n "; print_usage(); print "\n"; @@ -122,7 +122,7 @@ sub print_help () { } sub version () { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 1113 $ '); exit $ERRORS{'OK'}; } diff --git a/contrib/check_fan_fsc_present b/contrib/check_fan_fsc_present index 5bddb87..19f8e7f 100644 --- a/contrib/check_fan_fsc_present +++ b/contrib/check_fan_fsc_present @@ -113,7 +113,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$\n '); + print_revision($PROGNAME,'$Revision: 1113 $\n '); print "Copyright (c) 2003 Rainer Duffner\n "; print_usage(); print "\n"; @@ -124,7 +124,7 @@ sub print_help () { } sub version () { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 1113 $ '); exit $ERRORS{'OK'}; } diff --git a/contrib/check_frontpage b/contrib/check_frontpage index ee958d3..21c5267 100644 --- a/contrib/check_frontpage +++ b/contrib/check_frontpage @@ -1,6 +1,6 @@ #! /usr/bin/perl -w # -# $Id$ +# $Id: check_frontpage 1112 2005-01-27 04:46:08Z stanleyhopcroft $ # # Check that FrontPage extensions appear to be working on a specified host. # Currently only checks that the hit counter is not returning an error. @@ -42,7 +42,7 @@ GetOptions "H=s" => \$opt_H, "hostname=s" => \$opt_H); if ($opt_V) { - print_revision($PROGNAME,'$Revision$'); #' + print_revision($PROGNAME,'$Revision: 1112 $'); #' exit $ERRORS{'OK'}; } @@ -139,7 +139,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'$Revision: 1112 $'); print "Copyright (c) 2003 Kev Green\n"; print "\n"; print "FrontPage remains a copyright/trademark of Microsoft Corporation.\n"; diff --git a/contrib/check_http-with-client-certificate.c b/contrib/check_http-with-client-certificate.c index 157d028..60e1481 100644 --- a/contrib/check_http-with-client-certificate.c +++ b/contrib/check_http-with-client-certificate.c @@ -37,7 +37,7 @@ *****************************************************************************/ const char *progname = "check_http"; -#define REVISION "$Revision$" +#define REVISION "$Revision: 1117 $" #define CVSREVISION "1.24" #define COPYRIGHT "2003" #define AUTHORS "Fabian Pehla" diff --git a/contrib/check_hw.sh b/contrib/check_hw.sh index f03398e..9d3b574 100644 --- a/contrib/check_hw.sh +++ b/contrib/check_hw.sh @@ -16,7 +16,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin PROGNAME=`basename $0` PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` -REVISION=`echo '$Revision$' | sed -e 's/[^0-9.]//g'` +REVISION=`echo '$Revision: 939 $' | sed -e 's/[^0-9.]//g'` . $PROGPATH/utils.sh diff --git a/contrib/check_ica_master_browser.pl b/contrib/check_ica_master_browser.pl index 1bbab60..922e718 100755 --- a/contrib/check_ica_master_browser.pl +++ b/contrib/check_ica_master_browser.pl @@ -1,8 +1,7 @@ #!/usr/bin/perl -w -# $Id$ +# $Id: check_ica_master_browser.pl 1099 2005-01-25 09:09:33Z stanleyhopcroft $ -# $Log$ # Revision 1.1 2005/01/25 09:09:33 stanleyhopcroft # New plugin - checks that ICA master browser is what it should be (important for firewalled dialup) # @@ -170,7 +169,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 1099 $ '); print "Copyright (c) 2002 Ed Rolison/Tom De Blende/S Hopcroft Perl Check Citrix Master Browser plugin for Nagios. @@ -218,7 +217,7 @@ The ICA Client requests the address of the ICA master browser from the Citrix se } sub version () { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 1099 $ '); exit $ERRORS{'OK'}; } diff --git a/contrib/check_ica_metaframe_pub_apps.pl b/contrib/check_ica_metaframe_pub_apps.pl index cc1325b..0edbdca 100755 --- a/contrib/check_ica_metaframe_pub_apps.pl +++ b/contrib/check_ica_metaframe_pub_apps.pl @@ -1,8 +1,7 @@ #!/usr/bin/perl -w -# $Id$ +# $Id: check_ica_metaframe_pub_apps.pl 1098 2005-01-25 09:07:39Z stanleyhopcroft $ -# $Log$ # Revision 1.1 2005/01/25 09:07:39 stanleyhopcroft # Replacement (structured name mainly) for check_citrix: check of ICA browse service # @@ -303,7 +302,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 1098 $ '); print "Copyright (c) 2002 Ed Rolison/Tom De Blende/S Hopcroft Perl Check Citrix plugin for Nagios. @@ -350,7 +349,7 @@ The plugin works by } sub version () { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 1098 $ '); exit $ERRORS{'OK'}; } diff --git a/contrib/check_ica_program_neigbourhood.pl b/contrib/check_ica_program_neigbourhood.pl index f29c0d1..1f0fb45 100755 --- a/contrib/check_ica_program_neigbourhood.pl +++ b/contrib/check_ica_program_neigbourhood.pl @@ -1,8 +1,7 @@ #!/usr/bin/perl -w -# $Id$ +# $Id: check_ica_program_neigbourhood.pl 1097 2005-01-25 09:05:53Z stanleyhopcroft $ -# $Log$ # Revision 1.1 2005/01/25 09:05:53 stanleyhopcroft # New plugin to check Citrix Metaframe XP "Program Neighbourhood" # @@ -290,7 +289,7 @@ sub print_help() { # 1 2 3 4 5 6 7 8 #12345678901234567890123456789012345678901234567890123456789012345678901234567890 - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 1097 $ '); my $help = < # diff --git a/contrib/check_ms_spooler.pl b/contrib/check_ms_spooler.pl index cf2464a..3a80a76 100755 --- a/contrib/check_ms_spooler.pl +++ b/contrib/check_ms_spooler.pl @@ -1,8 +1,7 @@ #!/usr/bin/perl -w -# $Id$ +# $Id: check_ms_spooler.pl 64 2002-07-16 00:04:42Z stanleyhopcroft $ -# $Log$ # Revision 1.1 2002/07/16 00:04:42 stanleyhopcroft # Primitive and in need of refinement test of MS spooler (with smbclient) # @@ -268,7 +267,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 64 $ '); print "Copyright (c) 2001 Karl DeBisschop/S Hopcroft Perl Check MS Spooler plugin for NetSaint. Display a subset of the queues on an SMB (Samba or MS) print spooler. @@ -292,7 +291,7 @@ Perl Check MS Spooler plugin for NetSaint. Display a subset of the queues on an } sub version () { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 64 $ '); exit $ERRORS{'OK'}; } diff --git a/contrib/check_ora_table_space.pl b/contrib/check_ora_table_space.pl index 24497b2..7ce90c8 100644 --- a/contrib/check_ora_table_space.pl +++ b/contrib/check_ora_table_space.pl @@ -4,8 +4,8 @@ # Written by: Erwan Arzur (erwan@netvalue.com) # License: GPL # -# Last Modified: $Date$ -# Revisiin: $Revision$ +# Last Modified: $Date: 2002-02-28 01:42:51 -0500 (Thu, 28 Feb 2002) $ +# Revisiin: $Revision: 2 $ # # "check_ora_table_space.pl" plugin to check the state of Oracle # table spaces. Scarce documentation. diff --git a/contrib/check_oracle_instance.pl b/contrib/check_oracle_instance.pl index 1175c1e..3ba8d57 100644 --- a/contrib/check_oracle_instance.pl +++ b/contrib/check_oracle_instance.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id$ +# $Id: check_oracle_instance.pl 10 2002-04-03 02:58:47Z sghosh $ # Copyright (c) 2002 Sven Dolderer # some pieces of Code adopted from Adam vonNieda's oracletool.pl @@ -23,7 +23,7 @@ require DBD::Oracle || die "It appears that the DBD::Oracle module is not instal use vars qw($VERSION $PROGNAME $logfile $debug $state $dbh $database $username $password $message $sql $cursor $opt_asession $opt_nsession $opt_tablespace $opt_nextents $opt_fextents $opt_aextents $privsok $warn $critical); -'$Revision$' =~ /^.*(\d+.\d+) \$$/; # Use The Revision from RCS/CVS +'$Revision: 10 $' =~ /^.*(\d+.\d+) \$$/; # Use The Revision from RCS/CVS $VERSION = $1; $0 =~ m!^.*/([^/]+)$!; $PROGNAME = $1; diff --git a/contrib/check_oracle_tbs b/contrib/check_oracle_tbs index 0efdd1e..8281a4e 100644 --- a/contrib/check_oracle_tbs +++ b/contrib/check_oracle_tbs @@ -30,7 +30,7 @@ if (!$ENV{ORACLE_HOME}) { my $state = $ERRORS{'UNKNOWN'}; my $answer = undef; -my ($MAJOR_VERSION, $MINOR_VERSION) = q$Revision$ =~ /(\d+)\.(\d+)/; +my ($MAJOR_VERSION, $MINOR_VERSION) = q$Revision: 1134 $ =~ /(\d+)\.(\d+)/; my $VERSION = sprintf("%d.%02d", $MAJOR_VERSION - 1, $MINOR_VERSION); my $opt_debug; # -d|--debug diff --git a/contrib/check_pfstate b/contrib/check_pfstate index 6fe0d9b..57dde3f 100644 --- a/contrib/check_pfstate +++ b/contrib/check_pfstate @@ -27,7 +27,7 @@ GetOptions "c=s" => \$opt_c, "critical=s" => \$opt_c); if ($opt_V) { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'$Revision: 1112 $'); exit $ERRORS{'OK'}; } if ($opt_h) { @@ -67,7 +67,7 @@ exit $ERRORS{'OK'}; sub print_help { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'$Revision: 1112 $'); print "Copyright (c) 2002 Jason Dixon\n\nThis plugin checks the number of state table entries on a PF-enabled OpenBSD system.\n\n"; print "Usage:\t-H, --hostname= [-w, --warning=] [-c, --critical=]\n\n\tDefault warning is 50000 and critical is 60000.\n\n"; support(); diff --git a/contrib/check_rbl.c b/contrib/check_rbl.c index 6831b65..eec84ad 100644 --- a/contrib/check_rbl.c +++ b/contrib/check_rbl.c @@ -11,7 +11,7 @@ * * License: GPL * * Copyright (c) 2000 * * -* * $Id$ +* * $Id: check_rbl.c 970 2004-12-02 00:30:32Z opensides $ * *****************************************************************************/ @@ -22,7 +22,7 @@ #include "string.h" const char progname = "check_rbl"; -const char *revision = "$Revision$"; +const char *revision = "$Revision: 970 $"; //const char *copyright = "2000-2003"; //const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -263,7 +263,7 @@ int call_getopt(int argc, char **argv) } break; case 'V': /* version */ - print_revision(progname,"$Revision$"); + print_revision(progname,"$Revision: 970 $"); exit(STATE_OK); case 'h': /* help */ print_help(); @@ -291,7 +291,7 @@ int validate_arguments(void) void print_help(void) { - print_revision(progname,"$Revision$"); + print_revision(progname,"$Revision: 970 $"); printf ("Copyright (c) 2000 Karl DeBisschop\n\n" "This plugin uses dig to test whether the specified host is on any RBL lists.\n\n"); diff --git a/contrib/check_smb.sh b/contrib/check_smb.sh index 728535a..9d0da72 100644 --- a/contrib/check_smb.sh +++ b/contrib/check_smb.sh @@ -26,7 +26,7 @@ # PROGNAME=`basename $0` PROGPATH=`echo $0 | /bin/sed -e 's,[\\/][^\\/][^\\/]*$,,'` -REVISION=`echo '$Revision$' | sed -e 's/[^0-9.]//g'` +REVISION=`echo '$Revision: 71 $' | sed -e 's/[^0-9.]//g'` . $PROGPATH/utils.sh diff --git a/contrib/check_snmp_disk_monitor.pl b/contrib/check_snmp_disk_monitor.pl index 7a70f71..9a2edaa 100644 --- a/contrib/check_snmp_disk_monitor.pl +++ b/contrib/check_snmp_disk_monitor.pl @@ -52,7 +52,7 @@ sub process_options { } sub local_print_revision { - print_revision( $PROGNAME, '$Revision$ ' ) + print_revision( $PROGNAME, '$Revision: 82 $ ' ) } sub print_usage { diff --git a/contrib/check_snmp_printer.pl b/contrib/check_snmp_printer.pl index 9fc5fed..cc7943b 100755 --- a/contrib/check_snmp_printer.pl +++ b/contrib/check_snmp_printer.pl @@ -116,7 +116,7 @@ GetOptions $PROGNAME = "check_snmp_printer"; if ($opt_V) { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'$Revision: 795 $'); exit $ERRORS{'OK'}; } @@ -572,7 +572,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'$Revision: 795 $'); print "Copyright (c) 2002 Subhendu Ghosh/Ethan Galstad. This plugin reports the status of an network printer with an SNMP management diff --git a/contrib/check_snmp_process_monitor.pl b/contrib/check_snmp_process_monitor.pl index c98ee7d..0f44597 100644 --- a/contrib/check_snmp_process_monitor.pl +++ b/contrib/check_snmp_process_monitor.pl @@ -91,7 +91,7 @@ sub process_options { } sub local_print_revision { - print_revision( $PROGNAME, '$Revision$ ' ) + print_revision( $PROGNAME, '$Revision: 84 $ ' ) } sub print_usage { diff --git a/contrib/check_snmp_procs.pl b/contrib/check_snmp_procs.pl index 991fc71..4d19ff1 100644 --- a/contrib/check_snmp_procs.pl +++ b/contrib/check_snmp_procs.pl @@ -109,7 +109,7 @@ if (GetOptions( } if ($opt_version) { - print_revision($PROGNAME, "\$Revision$REVISION \$"); + print_revision($PROGNAME, "\$Revision: 1771 $REVISION \$"); exit $ERRORS{'OK'}; } @@ -529,7 +529,7 @@ sub print_usage { # sub print_help { - print_revision($PROGNAME, "\$Revision$REVISION \$"); + print_revision($PROGNAME, "\$Revision: 1771 $REVISION \$"); print "Copyright (c) 2003 David Alden Check if processes are running on a host via snmp diff --git a/contrib/check_temp_cpq b/contrib/check_temp_cpq index 14b06a2..6edae6e 100644 --- a/contrib/check_temp_cpq +++ b/contrib/check_temp_cpq @@ -138,7 +138,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$\n '); + print_revision($PROGNAME,'$Revision: 1113 $\n '); print "Copyright (c) 2003 Rainer Duffner\n "; print_usage(); print "\n"; @@ -151,7 +151,7 @@ sub print_help () { } sub version () { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 1113 $ '); exit $ERRORS{'OK'}; } diff --git a/contrib/check_temp_fsc b/contrib/check_temp_fsc index 6cae859..33470ea 100644 --- a/contrib/check_temp_fsc +++ b/contrib/check_temp_fsc @@ -138,7 +138,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$\n '); + print_revision($PROGNAME,'$Revision: 1113 $\n '); print "Copyright (c) 2003 Rainer Duffner\n "; print_usage(); print "\n"; @@ -149,7 +149,7 @@ sub print_help () { } sub version () { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 1113 $ '); exit $ERRORS{'OK'}; } diff --git a/contrib/check_traceroute.pl b/contrib/check_traceroute.pl index c8d497b..569dc53 100755 --- a/contrib/check_traceroute.pl +++ b/contrib/check_traceroute.pl @@ -1,8 +1,7 @@ #!/usr/bin/perl -# $Id$ +# $Id: check_traceroute.pl 1115 2005-01-27 10:34:16Z stanleyhopcroft $ -# $Log$ # Revision 1.1 2005/01/27 10:34:16 stanleyhopcroft # Jon Meek's check_traceroute for Mon hacked by YT for Nagios. Prob pretty weak # @@ -32,7 +31,7 @@ getopts('i:H:N:R:T:dhrvV'); do { print_help ; exit $ERRORS{OK}; } if $opt_h ; -do { print_revision($PROGNAME, '$Revision$'); exit $ERRORS{OK}; } +do { print_revision($PROGNAME, '$Revision: 1115 $'); exit $ERRORS{OK}; } if $opt_V ; do { print_help; exit $ERRORS{OK}; } @@ -176,7 +175,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME, '$Revision$') ; + print_revision($PROGNAME, '$Revision: 1115 $') ; print "Copyright (c) 2004 J Meek/Karl DeBisschop This plugin checks whether traceroute to the destination succeeds and if so that the route string option (-R) matches the list of routers diff --git a/contrib/check_uptime.c b/contrib/check_uptime.c index fe98123..7afeb23 100644 --- a/contrib/check_uptime.c +++ b/contrib/check_uptime.c @@ -9,7 +9,7 @@ * Based on CHECK_LOAD.C * Copyright (c) 1999 Felipe Gustavo de Almeida * - * Last Modified: $Date$ + * Last Modified: $Date: 2002-02-28 21:42:56 -0500 (Thu, 28 Feb 2002) $ * * Command line: CHECK_UPTIME * @@ -44,7 +44,7 @@ int main(int argc, char **argv) if(argc != 2){ printf("Incorrect number of arguments supplied\n"); printf("\n"); - print_revision(argv[0],"$Revision$"); + print_revision(argv[0],"$Revision: 6 $"); printf("Copyright (c) 2000 Teresa Ramanan (tlr@redowl.org)\n"); printf("\n"); printf("Usage: %s \n",argv[0]); diff --git a/contrib/check_vcs.pl b/contrib/check_vcs.pl index 7ee0072..38afdae 100644 --- a/contrib/check_vcs.pl +++ b/contrib/check_vcs.pl @@ -71,7 +71,7 @@ sub print_help (); $vcs_negate = ''; $vcs_result = ''; $vcs_expected_result = 'ONLINE'; - $plugin_revision = '$Revision$ '; + $plugin_revision = '$Revision: 33 $ '; # Grab options from command line GetOptions diff --git a/contrib/check_wins.pl b/contrib/check_wins.pl index 0d11737..f11f864 100755 --- a/contrib/check_wins.pl +++ b/contrib/check_wins.pl @@ -1,8 +1,7 @@ #!/usr/bin/perl -w -# $Id$ +# $Id: check_wins.pl 940 2004-11-25 04:46:16Z stanleyhopcroft $ -# $Log$ # Revision 1.3 2004/11/25 04:46:16 stanleyhopcroft # Non functional tidy ups to check_wins # @@ -190,7 +189,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 940 $ '); print "Copyright (c) 2001 Karl DeBisschop/S Hopcroft Perl Check WINS plugin for NetSaint. @@ -237,7 +236,7 @@ The plugin works by } sub version () { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'$Revision: 940 $ '); exit $ERRORS{'OK'}; } diff --git a/contrib/packet_utils.pm b/contrib/packet_utils.pm index cd1e830..783b333 100755 --- a/contrib/packet_utils.pm +++ b/contrib/packet_utils.pm @@ -1,8 +1,7 @@ package packet_utils; -# $Id$ +# $Id: packet_utils.pm 1100 2005-01-25 09:12:47Z stanleyhopcroft $ -# $Log$ # Revision 1.1 2005/01/25 09:12:47 stanleyhopcroft # packet creation and dumping hacks used by check_ica* and check_lotus # diff --git a/contrib/utils.py b/contrib/utils.py index 73d795c..db0f1c9 100644 --- a/contrib/utils.py +++ b/contrib/utils.py @@ -8,7 +8,7 @@ #========================================================================== # -# Version: = '$Id$' +# Version: = '$Id: utils.py 2 2002-02-28 06:42:51Z egalstad $' # # (C) Rob W.W. Hooft, Nonius BV, 1998 # diff --git a/doc/BRANCHING b/doc/BRANCHING deleted file mode 100644 index d923a30..0000000 --- a/doc/BRANCHING +++ /dev/null @@ -1,10 +0,0 @@ -NOTES ON BRANCHING NAGIOSPLUG - -Questions: -Is this necessary? - -Branch format: b1_4_1 - -cvs tab -b r1_4-patches - -Consider the SF snapshot branches - should you remove any other branches? diff --git a/doc/developer-guidelines.sgml b/doc/developer-guidelines.sgml index 121549f..ed7e422 100644 --- a/doc/developer-guidelines.sgml +++ b/doc/developer-guidelines.sgml @@ -16,8 +16,8 @@ - $Revision$ - $Date$ + 1796 + 2007-09-24 14:51:07 -0400 (Mon, 24 Sep 2007) diff --git a/lib/extra_opts.c b/lib/extra_opts.c index 7e50c17..2939c7a 100644 --- a/lib/extra_opts.c +++ b/lib/extra_opts.c @@ -5,9 +5,6 @@ * License: GPL * Copyright (c) 2007 Nagios Plugins Development Team * -* Last Modified: $Date: 2008-03-15 18:42:01 -0400 (Sat, 15 Mar 2008) $ -* -* * 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 @@ -21,8 +18,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id: parse_ini.c 1950 2008-03-15 22:42:01Z dermoth $ -* *****************************************************************************/ #include "common.h" diff --git a/lib/parse_ini.c b/lib/parse_ini.c index c19952d..1d64a50 100644 --- a/lib/parse_ini.c +++ b/lib/parse_ini.c @@ -5,9 +5,6 @@ * License: GPL * 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 @@ -21,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/lib/tests/test_base64.c b/lib/tests/test_base64.c index 12b9268..5103d10 100644 --- a/lib/tests/test_base64.c +++ b/lib/tests/test_base64.c @@ -13,7 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/lib/tests/test_cmd.c b/lib/tests/test_cmd.c index 961da64..29ca42a 100644 --- a/lib/tests/test_cmd.c +++ b/lib/tests/test_cmd.c @@ -13,7 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/lib/tests/test_disk.c b/lib/tests/test_disk.c index 06c9baa..d604222 100644 --- a/lib/tests/test_disk.c +++ b/lib/tests/test_disk.c @@ -13,7 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/lib/tests/test_ini.c b/lib/tests/test_ini.c index 76a948b..c0853d7 100644 --- a/lib/tests/test_ini.c +++ b/lib/tests/test_ini.c @@ -13,7 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/lib/tests/test_opts.c b/lib/tests/test_opts.c index 6d6167e..ad9a854 100644 --- a/lib/tests/test_opts.c +++ b/lib/tests/test_opts.c @@ -13,8 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id: test_ini.c 1951 2008-03-16 18:10:47Z dermoth $ -* *****************************************************************************/ #include "common.h" diff --git a/lib/tests/test_tcp.c b/lib/tests/test_tcp.c index 9694707..6cf9394 100644 --- a/lib/tests/test_tcp.c +++ b/lib/tests/test_tcp.c @@ -13,7 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/lib/tests/test_utils.c b/lib/tests/test_utils.c index b2a9e69..64efca2 100644 --- a/lib/tests/test_utils.c +++ b/lib/tests/test_utils.c @@ -13,7 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/lib/utils_base.c b/lib/utils_base.c index 68f4567..d6437fc 100644 --- a/lib/utils_base.c +++ b/lib/utils_base.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 2006 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Library of useful functions for plugins * * @@ -23,7 +21,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ diff --git a/lib/utils_cmd.c b/lib/utils_cmd.c index 5ba2f55..e10ab91 100644 --- a/lib/utils_cmd.c +++ b/lib/utils_cmd.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/lib/utils_disk.c b/lib/utils_disk.c index ba2b21d..3d20f4d 100644 --- a/lib/utils_disk.c +++ b/lib/utils_disk.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains utilities for check_disk. These are tested by libtap @@ -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/lib/utils_tcp.c b/lib/utils_tcp.c index 58d50b6..8589ce6 100644 --- a/lib/utils_tcp.c +++ b/lib/utils_tcp.c @@ -5,8 +5,6 @@ * License: GPL * Copyright (c) 1999-2007 Nagios Plugins Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains utilities for check_tcp. These are tested by libtap @@ -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-root/Makefile.am b/plugins-root/Makefile.am index 107d993..de8813f 100644 --- a/plugins-root/Makefile.am +++ b/plugins-root/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 $(srcdir) INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins @SSLINCLUDE@ @@ -74,3 +80,10 @@ pst3_LDFLAGS = @PST3CFLAGS@ check_dhcp_DEPENDENCIES = check_dhcp.c $(NETOBJS) $(DEPLIBS) check_icmp_DEPENDENCIES = check_icmp.c $(NETOBJS) + +all-local: .FORCE-NP-VERSION-FILE + +clean-local: + rm -f NP-VERSION-FILE + +.PHONY: .FORCE-NP-VERSION-FILE diff --git a/plugins-root/check_dhcp.c b/plugins-root/check_dhcp.c index 35874a9..bdd348f 100644 --- a/plugins-root/check_dhcp.c +++ b/plugins-root/check_dhcp.c @@ -6,8 +6,6 @@ * Copyright (c) 2001-2004 Ethan Galstad (nagios@nagios.org) * Copyright (c) 2001-2007 Nagios Plugin Development Team * -* Last Modified: $Date$ -* * Description: * * This file contains the check_dhcp 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_dhcp"; -const char *revision = "$Revision$"; const char *copyright = "2001-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -1168,7 +1164,7 @@ int call_getopt(int argc, char **argv){ break; case 'V': /* version */ - print_revision(progname,revision); + print_revision(progname, NP_VERSION); exit(STATE_OK); case 'h': /* help */ @@ -1385,7 +1381,7 @@ void print_hardware_address(const unsigned char *address){ /* print usage help */ void print_help(void){ - print_revision(progname,revision); + print_revision(progname, NP_VERSION); printf("Copyright (c) 2001-2004 Ethan Galstad (nagios@nagios.org)\n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index cc3f3d5..bbdfae7 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c @@ -6,8 +6,6 @@ * Copyright (c) 2005-2008 Nagios Plugins Development Team * Original Author : Andreas Ericsson * -* Last Modified: $Date$ -* * Description: * * This file contains the check_icmp plugin @@ -35,14 +33,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* $Id$ * *****************************************************************************/ /* progname may change */ /* char *progname = "check_icmp"; */ char *progname; -const char *revision = "$Revision$"; const char *copyright = "2005-2008"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -516,7 +512,7 @@ main(int argc, char **argv) set_source_ip(optarg); break; case 'V': /* version */ - /*print_revision (progname, revision);*/ /* FIXME: Why? */ + print_revision (progname, NP_VERSION); exit (STATE_OK); case 'h': /* help */ print_help (); @@ -1272,7 +1268,7 @@ void print_help(void) { - /*print_revision (progname, revision);*/ /* FIXME: Why? */ + /*print_revision (progname);*/ /* FIXME: Why? */ printf ("Copyright (c) 2005 Andreas Ericsson \n"); printf (COPYRIGHT, copyright, email); diff --git a/plugins-root/t/check_icmp.t b/plugins-root/t/check_icmp.t index 11535ea..78bfd63 100644 --- a/plugins-root/t/check_icmp.t +++ b/plugins-root/t/check_icmp.t @@ -2,8 +2,6 @@ # # Ping Response Tests via check_icmp # -# $Id$ -# use strict; use Test::More; diff --git a/plugins-scripts/Makefile.am b/plugins-scripts/Makefile.am index 01fca20..c9e3e40 100644 --- a/plugins-scripts/Makefile.am +++ b/plugins-scripts/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 + +export NP_VERSION:= $(NP_VERSION) + SUFFIXES = .pl .sh VPATH=$(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t @@ -18,6 +24,8 @@ TESTS_ENVIRONMENT=perl -I $(top_builddir) -I $(top_srcdir) TESTS = @SCRIPT_TEST@ +all-local: NP-VERSION-FILE + test: perl -I $(top_builddir) -I $(top_srcdir) ../test.pl perl -I $(top_builddir) -I $(top_srcdir) ../test.pl t/utils.t # utils.t is excluded from above, so manually ask to test @@ -35,3 +43,8 @@ CLEANFILES=$(libexec_SCRIPTS) .sh : $(AWK) -f ./subst $< > $@ chmod +x $@ + +clean-local: + rm -f NP-VERSION-FILE + +.PHONY: .FORCE-NP-VERSION-FILE diff --git a/plugins-scripts/check_breeze.pl b/plugins-scripts/check_breeze.pl index 0e9cffb..a4e8542 100755 --- a/plugins-scripts/check_breeze.pl +++ b/plugins-scripts/check_breeze.pl @@ -26,7 +26,7 @@ GetOptions "C=s" => \$opt_C, "community=s" => \$opt_C); if ($opt_V) { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'@NP_VERSION@'); exit $ERRORS{'OK'}; } @@ -65,7 +65,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'@NP_VERSION@'); print "Copyright (c) 2000 Jeffrey Blank/Karl DeBisschop This plugin reports the signal strength of a Breezecom wireless equipment diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl index 4f8a9a7..3f531ac 100755 --- a/plugins-scripts/check_disk_smb.pl +++ b/plugins-scripts/check_disk_smb.pl @@ -16,7 +16,6 @@ # drives is a pain in the butt # 2-May-2002 - SGhosh fix for embedded perl # -# $Id$ # require 5.004; @@ -52,7 +51,7 @@ GetOptions "H=s" => \$opt_H, "hostname=s" => \$opt_H); if ($opt_V) { - print_revision($PROGNAME,'$Revision$'); #' + print_revision($PROGNAME,'@NP_VERSION@'); #' exit $ERRORS{'OK'}; } @@ -243,7 +242,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'@NP_VERSION@'); print "Copyright (c) 2000 Michael Anthon/Karl DeBisschop Perl Check SMB Disk plugin for Nagios diff --git a/plugins-scripts/check_file_age.pl b/plugins-scripts/check_file_age.pl index ca8883e..dcd5efa 100755 --- a/plugins-scripts/check_file_age.pl +++ b/plugins-scripts/check_file_age.pl @@ -1,5 +1,4 @@ #!/bin/perl -w -# $Id$ # check_file_age.pl Copyright (C) 2003 Steven Grimm # @@ -55,7 +54,7 @@ GetOptions( "C=f" => \$opt_C, "critical-size=f" => \$opt_C); if ($opt_V) { - print_revision($PROGNAME, '$Revision$'); + print_revision($PROGNAME, '@NP_VERSION@'); exit $ERRORS{'OK'}; } @@ -102,7 +101,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME, '$Revision$'); + print_revision($PROGNAME, '@NP_VERSION@'); print "Copyright (c) 2003 Steven Grimm\n\n"; print_usage(); print "\n"; diff --git a/plugins-scripts/check_flexlm.pl b/plugins-scripts/check_flexlm.pl index ade5843..54d933c 100755 --- a/plugins-scripts/check_flexlm.pl +++ b/plugins-scripts/check_flexlm.pl @@ -26,7 +26,6 @@ # initial version: 9-10-99 Ernst-Dieter Martin edmt@infineon.com # # License: GPL -# $Id$ # # lmstat output patches from Steve Rigler/Cliff Rice 13-Apr-2002 # srigler@marathonoil.com,cerice@marathonoil.com @@ -57,7 +56,7 @@ GetOptions "t=i" => \$opt_t, "timeout=i" => \$opt_t); if ($opt_V) { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'@NP_VERSION@'); exit $ERRORS{'OK'}; } @@ -217,7 +216,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'@NP_VERSION@'); print "Copyright (c) 2000 Ernst-Dieter Martin/Karl DeBisschop Check available flexlm license managers diff --git a/plugins-scripts/check_ifoperstatus.pl b/plugins-scripts/check_ifoperstatus.pl old mode 100644 new mode 100755 index 75e852d..d0a1655 --- a/plugins-scripts/check_ifoperstatus.pl +++ b/plugins-scripts/check_ifoperstatus.pl @@ -25,7 +25,6 @@ # Report bugs to: nagiosplug-help@lists.sourceforge.net # # 11.01.2000 Version 1.0 -# $Id$ # # Patches from Guy Van Den Bergh to warn on ifadminstatus down interfaces # instead of critical. @@ -313,7 +312,7 @@ sub print_help() { printf "intensive. Use it sparingly or not at all. -n is used to match against\n"; printf "a much more descriptive ifName value in the IfXTable to verify that the\n"; printf "snmpkey has not changed to some other network interface after a reboot.\n\n"; - print_revision($PROGNAME, '$Revision$'); + print_revision($PROGNAME, '@NP_VERSION@'); } @@ -351,7 +350,7 @@ sub process_arguments() { } if ($opt_V) { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'@NP_VERSION@'); exit $ERRORS{'OK'}; } diff --git a/plugins-scripts/check_ifstatus.pl b/plugins-scripts/check_ifstatus.pl index 1a168bf..bae3ffa 100755 --- a/plugins-scripts/check_ifstatus.pl +++ b/plugins-scripts/check_ifstatus.pl @@ -29,7 +29,6 @@ # # 11.01.2000 Version 1.0 # -# $Id$ use POSIX; use strict; @@ -255,7 +254,7 @@ sub print_help (){ printf " -t (--timeout) seconds before the plugin times out (default=$TIMEOUT)\n"; printf " -V (--version) Plugin version\n"; printf " -h (--help) usage help \n\n"; - print_revision($PROGNAME, '$Revision$'); + print_revision($PROGNAME, '@NP_VERSION@'); } @@ -285,7 +284,7 @@ sub process_arguments() { exit $ERRORS{'OK'}; } if ($opt_V) { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'@NP_VERSION@'); exit $ERRORS{'OK'}; } diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl index 7a90a96..cc730cf 100755 --- a/plugins-scripts/check_ircd.pl +++ b/plugins-scripts/check_ircd.pl @@ -7,7 +7,6 @@ # # Date: 1999/09/20 # -# $Id$ # # Description: This script will check to see if an IRCD is running # about how many users it has @@ -119,7 +118,7 @@ sub print_usage () { sub print_help () { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'@NP_VERSION@'); print "Copyright (c) 2000 Richard Mayhew/Karl DeBisschop Perl Check IRCD plugin for Nagios @@ -190,7 +189,7 @@ MAIN: "H=s" => \$opt_H, "hostname=s" => \$opt_H); if ($opt_V) { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'@NP_VERSION@'); exit $ERRORS{'OK'}; } diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh index 6f6e68c..a1bfb48 100755 --- a/plugins-scripts/check_log.sh +++ b/plugins-scripts/check_log.sh @@ -71,7 +71,7 @@ TOUCH="/bin/touch" PROGNAME=`/bin/basename $0` PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` -REVISION=`echo '$Revision$' | sed -e 's/[^0-9.]//g'` +REVISION="@NP_VERSION@" . $PROGPATH/utils.sh diff --git a/plugins-scripts/check_mailq.pl b/plugins-scripts/check_mailq.pl index c676e41..95ef2ce 100755 --- a/plugins-scripts/check_mailq.pl +++ b/plugins-scripts/check_mailq.pl @@ -22,7 +22,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # -# $Id$ # ############################################################################ @@ -522,7 +521,7 @@ sub process_arguments(){ ); if ($opt_V) { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'@NP_VERSION@'); exit $ERRORS{'OK'}; } @@ -580,7 +579,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'@NP_VERSION@'); print "Copyright (c) 2002 Subhendu Ghosh/Carlos Canau/Benjamin Schmid\n"; print "\n"; print_usage(); diff --git a/plugins-scripts/check_mssql.pl b/plugins-scripts/check_mssql.pl index fa15476..9a8fc51 100755 --- a/plugins-scripts/check_mssql.pl +++ b/plugins-scripts/check_mssql.pl @@ -23,7 +23,6 @@ # # Report bugs to: nagiosplug-help@lists.sourceforge.net # -# $Id$ # @@ -125,7 +124,7 @@ sub process_arguments { "V" => \$opt_V, "version" => \$opt_V); if (defined $opt_V) { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'@NP_VERSION@'); exit $ERRORS{'OK'}; } diff --git a/plugins-scripts/check_netdns.pl b/plugins-scripts/check_netdns.pl index 6872b93..ecdbdb1 100755 --- a/plugins-scripts/check_netdns.pl +++ b/plugins-scripts/check_netdns.pl @@ -5,7 +5,6 @@ # # Copyright 2000, virCIO, LLP # -# $Log$ # Revision 1.3 2002/05/07 05:35:49 sghosh # 2nd fix for ePN # diff --git a/plugins-scripts/check_ntp.pl b/plugins-scripts/check_ntp.pl index d4175f6..5c87e0a 100755 --- a/plugins-scripts/check_ntp.pl +++ b/plugins-scripts/check_ntp.pl @@ -7,7 +7,6 @@ # be installed on the system, however since it's part of the ntp suite, you # should already have it installed. # -# $Id$ # # Nothing clever done in this program - its a very simple bare basics hack to # get the job done. @@ -97,7 +96,7 @@ GetOptions "H=s" => \$opt_H, "hostname=s" => \$opt_H); if ($opt_V) { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'@NP_VERSION@'); exit $ERRORS{'OK'}; } @@ -443,7 +442,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'@NP_VERSION@'); print "Copyright (c) 2003 Bo Kersey/Karl DeBisschop\n"; print "\n"; print_usage(); diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh index 0a8f152..664795e 100755 --- a/plugins-scripts/check_oracle.sh +++ b/plugins-scripts/check_oracle.sh @@ -8,7 +8,7 @@ PROGNAME=`basename $0` PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` -REVISION=`echo '$Revision$' | sed -e 's/[^0-9.]//g'` +REVISION="@NP_VERSION@" . $PROGPATH/utils.sh diff --git a/plugins-scripts/check_rpc.pl b/plugins-scripts/check_rpc.pl index 20c204d..d2701e9 100755 --- a/plugins-scripts/check_rpc.pl +++ b/plugins-scripts/check_rpc.pl @@ -15,10 +15,8 @@ # # initial version: 3 May 2000 by Truongchinh Nguyen and Karl DeBisschop # Modified May 2002 Subhendu Ghosh - support for ePN and patches -# current status: $Revision$ # # Copyright Notice: GPL -# $Id$ # use strict; @@ -38,13 +36,13 @@ sub print_help (); sub print_usage (); sub in ($$); -$ENV{'BASH_ENV'}=''; +$ENV{'BASH_ENV'}=''; $ENV{'ENV'}=''; $ENV{'PATH'}=''; $ENV{'LC_ALL'}='C'; #Initialise protocol for each progname number -# 'u' for UDP, 't' for TCP +# 'u' for UDP, 't' for TCP $proto[10003]='u'; $proto[10004]='u'; $proto[10007]='u'; @@ -67,9 +65,9 @@ GetOptions( if ($opt_h) { print_help(); exit $ERRORS{'OK'}; } # -V means display version number -if ($opt_V) { - print_revision($PROGNAME,'$Revision$ '); - exit $ERRORS{'OK'}; +if ($opt_V) { + print_revision($PROGNAME,'@NP_VERSION@'); + exit $ERRORS{'OK'}; } # Hash containing all RPC program names and numbers @@ -275,7 +273,7 @@ if (defined $opt_c ) { }else{ print "Version $vers is not an integer\n" if $verbose; } - + } }else{ get_rpcinfo(); @@ -311,7 +309,7 @@ sub get_rpcinfo { while ( $line = ) { printf "$line " if $verbose; chomp $line; - + if ( $line =~ /program $prognum version ([0-9]*) ready and waiting/ ) { $response .= " version $1"; $state = 'OK' unless $state ne 'UNKNOWN'; @@ -336,7 +334,7 @@ sub get_rpcinfo { sub print_help() { - print_revision($PROGNAME,'$Revision$ '); + print_revision($PROGNAME,'@NP_VERSION@'); print "Copyright (c) 2002 Karl DeBisschop/Truongchinh Nguyen/Subhendu Ghosh\n"; print "\n"; print "Check if a rpc service is registered and running using\n"; diff --git a/plugins-scripts/check_sensors.sh b/plugins-scripts/check_sensors.sh index 7e1d333..ae80fc4 100755 --- a/plugins-scripts/check_sensors.sh +++ b/plugins-scripts/check_sensors.sh @@ -4,7 +4,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin PROGNAME=`basename $0` PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` -REVISION=`echo '$Revision$' | sed -e 's/[^0-9.]//g'` +REVISION="@NP_VERSION@" . $PROGPATH/utils.sh diff --git a/plugins-scripts/check_wave.pl b/plugins-scripts/check_wave.pl index fe21701..2671112 100755 --- a/plugins-scripts/check_wave.pl +++ b/plugins-scripts/check_wave.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -wT # -# $Id$ use strict; @@ -30,7 +29,7 @@ GetOptions "H=s" => \$opt_H, "hostname=s" => \$opt_H); if ($opt_V) { - print_revision($PROGNAME,'$Revision$'); #' + print_revision($PROGNAME,'@NP_VERSION@'); #' exit $ERRORS{'OK'}; } @@ -112,7 +111,7 @@ sub print_usage () { } sub print_help () { - print_revision($PROGNAME,'$Revision$'); + print_revision($PROGNAME,'@NP_VERSION@'); print "Copyright (c) 2000 Jeffery Blank/Karl DeBisschop\n"; print "\n"; print_usage(); diff --git a/plugins-scripts/subst.in b/plugins-scripts/subst.in index 8986868..80b93d9 100644 --- a/plugins-scripts/subst.in +++ b/plugins-scripts/subst.in @@ -37,6 +37,9 @@ BEGIN { } +# Plugin revision +/@NP_VERSION@/ {sub(/@NP_VERSION@/,ENVIRON["NP_VERSION"]);} + # scripting language (first line) /^#! ?\/.*\/python/ {sub(/^#! ?\/.*\/python/,"#! @PYTHON@");} diff --git a/plugins-scripts/t/check_file_age.t b/plugins-scripts/t/check_file_age.t index 372b9f2..384c276 100644 --- a/plugins-scripts/t/check_file_age.t +++ b/plugins-scripts/t/check_file_age.t @@ -2,7 +2,6 @@ # # check_file_age tests # -# $Id$ # use strict; diff --git a/plugins-scripts/t/check_rpc.t b/plugins-scripts/t/check_rpc.t index 9fff0ee..be8ae2f 100644 --- a/plugins-scripts/t/check_rpc.t +++ b/plugins-scripts/t/check_rpc.t @@ -2,7 +2,6 @@ # # Remote Procedure Call (RPC) Tests via check_rpc # -# $Id$ # use strict; diff --git a/plugins-scripts/t/utils.t b/plugins-scripts/t/utils.t index f37f567..9c2c569 100644 --- a/plugins-scripts/t/utils.t +++ b/plugins-scripts/t/utils.t @@ -2,7 +2,6 @@ # # utils.pm tests # -# $Id$ # # Run with perl t/utils.t diff --git a/plugins-scripts/utils.pm.in b/plugins-scripts/utils.pm.in index 08776f1..37cd62c 100644 --- a/plugins-scripts/utils.pm.in +++ b/plugins-scripts/utils.pm.in @@ -1,5 +1,4 @@ # Utility drawer for Nagios plugins. -# $Id$ # # This will be deprecated soon. Please use Nagios::Plugin from CPAN # for new plugins @@ -32,8 +31,6 @@ $TIMEOUT = 15; sub print_revision ($$) { my $commandName = shift; my $pluginRevision = shift; - $pluginRevision =~ s/^\$Revision: //; - $pluginRevision =~ s/ \$\s*$//; print "$commandName v$pluginRevision (@PACKAGE@ @VERSION@)\n"; print "@WARRANTY@"; } diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 85e4a5d..5987690 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 49a7c4f..3da54bc 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 ce62eba..d0dbf34 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 04919e0..0138588 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 34197ec..08be937 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 12b77a8..98a061f 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 6bedfef..bb206a0 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 ff600a7..8c3f535 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 aeb2f93..75c7860 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 2a23b74..235be65 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 c815cc7..add9cc8 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 0d499d9..f4a7e5e 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 b0a7ef6..b0b0189 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 d0134a0..7ef4509 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 5ff9a8c..940d37e 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 a0bdbeb..550326b 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 1911d56..3232f1e 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 77f3b89..a1a6376 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 a92b857..802e345 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 a2debe2..954ff71 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 a0e5c11..4d9157a 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 20ecf64..ada7f0c 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 17876dd..acca17b 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 a5b122f..c7c7a75 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 c0e5ece..72a47b1 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 af04d3b..1d9ec8c 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 869ef67..abe721b 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 c457ad6..8c4c0e6 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 4aaeddb..4c72950 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 e0b0e2c..98f6bf9 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 d333c2a..cbc3103 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 4986fe6..6040aa1 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 0aafd95..1c92534 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 2e16e65..04cc4d9 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 f026963..be20ca3 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 0d81497..31659f1 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 f9a292c..ee93816 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 a498d20..7311ca2 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 4e7e9a2..1bd2c8b 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 0711dbf..dfc0941 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 40ff191..0808b68 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 1a5547e..6082cae 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 4c0a563..85c92fc 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 a27aecc..716bd52 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 8b09edd..fc7e78e 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 8c52b5c..7574b12 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 a048def..211dee2 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 3d4f901..f5035e2 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 b421d33..5f2c534 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 f3e78b8..4736f06 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 937eec3..323859e 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 99c434a..45c6a61 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 fc89e6e..64aaf0c 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 aaa7a41..15fc157 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 c59d59e..45a9be8 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 47a73e1..de6831b 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 2fe5600..10ded54 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 c98b4ac..c43a64a 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 fa957d1..9c6eae1 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 6a3d4ef..1aaf812 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 8987b84..55f6f75 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 e8bccf1..d971645 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 f78f07b..407af88 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 d5d4846..81fc24d 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 4f86ab9..b71c863 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 c9a0904..e1c119e 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 b78291d..62352fd 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 2a41ac5..fc32952 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 ff58bc0..aa6dae4 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 4e83139..369314e 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 435730f..e44adc9 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 2914350..fd2b5dd 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 f7fcf95..961f56e 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 e8a1e39..6d24675 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 4b313d3..cf7fac9 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 3a894f5..989bf01 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 aeabafd..a362008 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 c8f3a00..1900ef8 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 67e099d..65e06eb 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 */ diff --git a/test.pl.in b/test.pl.in index 22d0576..a022818 100755 --- a/test.pl.in +++ b/test.pl.in @@ -2,8 +2,6 @@ # # Wrapper for running the test harnesses # -# $Id$ -# use strict; diff --git a/tools/README b/tools/README index 21d5846..98c243b 100644 --- a/tools/README +++ b/tools/README @@ -1,4 +1,3 @@ -$Id$ The tools subdirectory contains anciliary files that can be used to configure or test the plugins. diff --git a/tools/git2svn.pl b/tools/git2svn.pl new file mode 100755 index 0000000..c90ea96 --- /dev/null +++ b/tools/git2svn.pl @@ -0,0 +1,129 @@ +#!/usr/bin/perl +# +# This script pulls the current branch, then walks the first parents and +# commit each of them into subversion. +# +# Copyright (C) 2008 Thomas Guyot-Sionnest +# +# The subversion repository must not be taking any external commit or this +# script will erase them. This script cannot run off a bare repository. +# +# *** INITIAL SETUP *** +# +# 1. Run this command line to get the repository up and ready for this script: +# +# $ cd /path/to/repo/; git log -1 --pretty=format:%H >.git/git2svn.last_commit_hash +# +# 2. Configure the lines below... $ENV{'GIT_DIR'} must point to the .git +# directory of the git-svn repo. +# +# *** INITIAL SETUP *** +# +# 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 +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +use strict; +use warnings; + +# This is the git working tree. Must be tied to a SVN repository +$ENV{'GIT_DIR'} = '/path/to/nagiosplug/.git'; + +# For some strange reasons this is needed: +$ENV{'GIT_SVN_ID'} = 'trunk'; + +# Path to git binary +my $git = '/usr/bin/git'; + +# Force commits from the hash stored in git2svn.last_commit_hash regardless +# of the state of the current repository. Use this if the repository was +# updated manually or if you need to set that hash to a specific value. +# NB: Re-committing old hashes will revert then roll again changes to SVN. +my $FORCE = 0; + +# Print debug output. Useful if you want to see what's being committed. +my $DEBUG = 0; + +for (@ARGV) { + $FORCE = 1 if (m/force/); + $DEBUG = 1 if (m/debug/); + if (m/help/ || m/--help/ || m/-h/) { + print "Usage: $0 [ debug ] [ force ] [ help ]\n"; + exit 0; + } +} + +# 1st get the current commit hash - we'll start committing to SVN from this one +print "Reading saved hash from $ENV{'GIT_DIR'}/git2svn.last_commit_hash\n" if ($DEBUG); +open(SAVHASH, "<$ENV{'GIT_DIR'}/git2svn.last_commit_hash") + or die("Can't open $ENV{'GIT_DIR'}/git2svn.last_commit_hash: $!"); +my $saved_commit_hash = ; +chomp $saved_commit_hash; +print "Saved commit hash: $saved_commit_hash\n" if ($DEBUG); +close(SAVHASH); + +my $last_commit_hash; +if ($FORCE) { + $last_commit_hash = $saved_commit_hash; + print "Forcing last commit hash to $last_commit_hash\n" if ($DEBUG); +} else { + print "Running: $git log -1 --pretty=format:%H\n" if ($DEBUG); + $last_commit_hash = `$git log -1 --pretty=format:%H`; + die("Failed to retrieve last commit hash") if ($?); + chomp $last_commit_hash; + print "Last commit hash: $last_commit_hash\n" if ($DEBUG); + + # Sanity check + die("Last commit hash and saved commit hash don't match, aborting") + if ($last_commit_hash ne $saved_commit_hash); +} + +# 2nd pull the remote tree +print "Running: $git pull\n" if ($DEBUG); +`$git pull`; +die("Failed to pull") if ($?); + +# Then list all first parents since the last one and insert them into an array +my @commits; +print "Running: $git rev-list --first-parent $last_commit_hash..HEAD\n" if ($DEBUG); +open(REVLIST, "$git rev-list --first-parent $last_commit_hash..HEAD|") + or die("Failed to retrieve revision list: $!"); + +while () { + chomp; + unshift @commits, $_; + print "Prepending the list with $_\n" if ($DEBUG); +} + +close(REVLIST); + +if (@commits == 0) { + print "Nothing to do.\n"; + exit 0; +} + +# Finally, commit every revision found into SVN +foreach my $commit (@commits) { + print "Commiting $commit to Subversion\n"; + print "Running: $git svn set-tree $commit\n" if ($DEBUG); + `$git svn set-tree $commit`; + die("Failed to commit hash $commit") if ($?); +} + +# Once done, update the last commit hash +$last_commit_hash = pop @commits; +print "Writing last commit hash to $ENV{'GIT_DIR'}/git2svn.last_commit_hash\n" if ($DEBUG); +open(SAVHASH, ">$ENV{'GIT_DIR'}/git2svn.last_commit_hash") + or die("Can't open $ENV{'GIT_DIR'}/git2svn.last_commit_hash for writing: $!"); +print SAVHASH $last_commit_hash; +close(SAVHASH); + diff --git a/tools/mini_epn.c b/tools/mini_epn.c index cd67538..6f3c5d0 100644 --- a/tools/mini_epn.c +++ b/tools/mini_epn.c @@ -5,8 +5,6 @@ * Modified by Douglas Warner * Last Modified: 05/02/2002 * - * $Id$ - * * This is a sample mini embedded Perl interpreter (hacked out checks.c and * perlembed) for use in testing Perl plugins. * diff --git a/tools/setup b/tools/setup index 6db4c6c..cdaa9c9 100755 --- a/tools/setup +++ b/tools/setup @@ -1,7 +1,6 @@ #!/bin/sh # # autogen.sh glue from CMU Cyrus IMAP -# $Id$ # # Requires: automake, autoconf, dpkg-dev # set -e diff --git a/tools/tinderbox_build b/tools/tinderbox_build index c1d40c6..ab4234a 100755 --- a/tools/tinderbox_build +++ b/tools/tinderbox_build @@ -14,7 +14,7 @@ use Sys::Hostname; use Cwd; use Time::Local; -my $Version = '$Revision$'; +my $Version = `git describe --abbrev=4 HEAD`; my $myhost = hostname; chomp($myhost); -- 2.30.2