aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BRANCHES9
-rw-r--r--Makefile.am5
-rwxr-xr-xNP-VERSION-GEN46
-rw-r--r--NPTest.pm2
-rw-r--r--acinclude.m41
-rwxr-xr-xautogen.sh2
-rw-r--r--command.cfg.in2
-rw-r--r--configure.in1
-rw-r--r--contrib/check_adptraid.sh2
-rw-r--r--contrib/check_apc_ups.pl4
-rw-r--r--contrib/check_appletalk.pl6
-rw-r--r--contrib/check_arping.pl4
-rw-r--r--contrib/check_email_loop.pl2
-rw-r--r--contrib/check_fan_cpq_present4
-rw-r--r--contrib/check_fan_fsc_present4
-rw-r--r--contrib/check_frontpage6
-rw-r--r--contrib/check_http-with-client-certificate.c2
-rw-r--r--contrib/check_hw.sh2
-rwxr-xr-xcontrib/check_ica_master_browser.pl7
-rwxr-xr-xcontrib/check_ica_metaframe_pub_apps.pl7
-rwxr-xr-xcontrib/check_ica_program_neigbourhood.pl7
-rw-r--r--contrib/check_inodes-freebsd.pl4
-rw-r--r--contrib/check_javaproc.pl2
-rwxr-xr-xcontrib/check_joy.sh2
-rw-r--r--contrib/check_log2.pl4
-rwxr-xr-xcontrib/check_lotus.pl7
-rw-r--r--contrib/check_mem.pl2
-rwxr-xr-xcontrib/check_ms_spooler.pl7
-rw-r--r--contrib/check_ora_table_space.pl4
-rw-r--r--contrib/check_oracle_instance.pl4
-rw-r--r--contrib/check_oracle_tbs2
-rw-r--r--contrib/check_pfstate4
-rw-r--r--contrib/check_rbl.c8
-rw-r--r--contrib/check_smb.sh2
-rw-r--r--contrib/check_snmp_disk_monitor.pl2
-rwxr-xr-xcontrib/check_snmp_printer.pl4
-rw-r--r--contrib/check_snmp_process_monitor.pl2
-rw-r--r--contrib/check_snmp_procs.pl4
-rw-r--r--contrib/check_temp_cpq4
-rw-r--r--contrib/check_temp_fsc4
-rwxr-xr-xcontrib/check_traceroute.pl7
-rw-r--r--contrib/check_uptime.c4
-rw-r--r--contrib/check_vcs.pl2
-rwxr-xr-xcontrib/check_wins.pl7
-rwxr-xr-xcontrib/packet_utils.pm3
-rw-r--r--contrib/utils.py2
-rw-r--r--doc/BRANCHING10
-rw-r--r--doc/developer-guidelines.sgml4
-rw-r--r--lib/extra_opts.c5
-rw-r--r--lib/parse_ini.c4
-rw-r--r--lib/tests/test_base64.c1
-rw-r--r--lib/tests/test_cmd.c1
-rw-r--r--lib/tests/test_disk.c1
-rw-r--r--lib/tests/test_ini.c1
-rw-r--r--lib/tests/test_opts.c2
-rw-r--r--lib/tests/test_tcp.c1
-rw-r--r--lib/tests/test_utils.c1
-rw-r--r--lib/utils_base.c3
-rw-r--r--lib/utils_cmd.c3
-rw-r--r--lib/utils_disk.c3
-rw-r--r--lib/utils_tcp.c3
-rw-r--r--plugins-root/Makefile.am13
-rw-r--r--plugins-root/check_dhcp.c8
-rw-r--r--plugins-root/check_icmp.c8
-rw-r--r--plugins-root/t/check_icmp.t2
-rw-r--r--plugins-scripts/Makefile.am13
-rwxr-xr-xplugins-scripts/check_breeze.pl4
-rwxr-xr-xplugins-scripts/check_disk_smb.pl5
-rwxr-xr-xplugins-scripts/check_file_age.pl5
-rwxr-xr-xplugins-scripts/check_flexlm.pl5
-rwxr-xr-x[-rw-r--r--]plugins-scripts/check_ifoperstatus.pl5
-rwxr-xr-xplugins-scripts/check_ifstatus.pl5
-rwxr-xr-xplugins-scripts/check_ircd.pl5
-rwxr-xr-xplugins-scripts/check_log.sh2
-rwxr-xr-xplugins-scripts/check_mailq.pl5
-rwxr-xr-xplugins-scripts/check_mssql.pl3
-rwxr-xr-xplugins-scripts/check_netdns.pl1
-rwxr-xr-xplugins-scripts/check_ntp.pl5
-rwxr-xr-xplugins-scripts/check_oracle.sh2
-rwxr-xr-xplugins-scripts/check_rpc.pl18
-rwxr-xr-xplugins-scripts/check_sensors.sh2
-rwxr-xr-xplugins-scripts/check_wave.pl5
-rw-r--r--plugins-scripts/subst.in3
-rw-r--r--plugins-scripts/t/check_file_age.t1
-rw-r--r--plugins-scripts/t/check_rpc.t1
-rw-r--r--plugins-scripts/t/utils.t1
-rw-r--r--plugins-scripts/utils.pm.in3
-rw-r--r--plugins/Makefile.am16
-rw-r--r--plugins/check_apt.c9
-rw-r--r--plugins/check_by_ssh.c8
-rw-r--r--plugins/check_cluster.c9
-rw-r--r--plugins/check_dig.c8
-rw-r--r--plugins/check_disk.c8
-rw-r--r--plugins/check_dns.c8
-rw-r--r--plugins/check_dummy.c8
-rw-r--r--plugins/check_fping.c8
-rw-r--r--plugins/check_game.c8
-rw-r--r--plugins/check_hpjd.c8
-rw-r--r--plugins/check_http.c12
-rw-r--r--plugins/check_ide_smart.c8
-rw-r--r--plugins/check_ldap.c8
-rw-r--r--plugins/check_load.c8
-rw-r--r--plugins/check_mrtg.c8
-rw-r--r--plugins/check_mrtgtraf.c8
-rw-r--r--plugins/check_mysql.c8
-rw-r--r--plugins/check_mysql_query.c8
-rw-r--r--plugins/check_nagios.c8
-rw-r--r--plugins/check_nt.c8
-rw-r--r--plugins/check_ntp.c8
-rw-r--r--plugins/check_ntp_peer.c8
-rw-r--r--plugins/check_ntp_time.c8
-rw-r--r--plugins/check_nwstat.c8
-rw-r--r--plugins/check_overcr.c8
-rw-r--r--plugins/check_pgsql.c8
-rw-r--r--plugins/check_ping.c8
-rw-r--r--plugins/check_procs.c8
-rw-r--r--plugins/check_radius.c8
-rw-r--r--plugins/check_real.c8
-rw-r--r--plugins/check_smtp.c8
-rw-r--r--plugins/check_snmp.c8
-rw-r--r--plugins/check_ssh.c12
-rw-r--r--plugins/check_swap.c8
-rw-r--r--plugins/check_tcp.c7
-rw-r--r--plugins/check_time.c8
-rw-r--r--plugins/check_ups.c8
-rw-r--r--plugins/check_users.c8
-rw-r--r--plugins/common.h3
-rw-r--r--plugins/negate.c8
-rw-r--r--plugins/netutils.c3
-rw-r--r--plugins/netutils.h3
-rw-r--r--plugins/popen.c3
-rw-r--r--plugins/popen.h1
-rw-r--r--plugins/runcmd.c3
-rw-r--r--plugins/runcmd.h1
-rw-r--r--plugins/sslutils.c3
-rw-r--r--plugins/t/check_by_ssh.t1
-rw-r--r--plugins/t/check_cluster.t1
-rw-r--r--plugins/t/check_dig.t1
-rw-r--r--plugins/t/check_disk.t1
-rw-r--r--plugins/t/check_dns.t1
-rw-r--r--plugins/t/check_dummy.t1
-rw-r--r--plugins/t/check_fping.t1
-rw-r--r--plugins/t/check_ftp.t1
-rw-r--r--plugins/t/check_hpjd.t1
-rw-r--r--plugins/t/check_http.t1
-rw-r--r--plugins/t/check_imap.t1
-rw-r--r--plugins/t/check_jabber.t1
-rw-r--r--plugins/t/check_load.t1
-rw-r--r--plugins/t/check_mysql.t1
-rw-r--r--plugins/t/check_mysql_query.t1
-rw-r--r--plugins/t/check_nagios.t1
-rw-r--r--plugins/t/check_ntp.t1
-rw-r--r--plugins/t/check_ping.t1
-rw-r--r--plugins/t/check_pop.t1
-rw-r--r--plugins/t/check_procs.t1
-rw-r--r--plugins/t/check_smtp.t1
-rw-r--r--plugins/t/check_snmp.t1
-rw-r--r--plugins/t/check_swap.t1
-rw-r--r--plugins/t/check_tcp.t1
-rw-r--r--plugins/t/check_time.t1
-rw-r--r--plugins/t/check_udp.t1
-rw-r--r--plugins/t/check_users.t1
-rw-r--r--plugins/t/negate.t2
-rw-r--r--plugins/urlize.c8
-rw-r--r--plugins/utils.c21
-rw-r--r--plugins/utils.h3
-rwxr-xr-xtest.pl.in2
-rw-r--r--tools/README1
-rwxr-xr-xtools/git2svn.pl129
-rw-r--r--tools/mini_epn.c2
-rwxr-xr-xtools/setup1
-rwxr-xr-xtools/tinderbox_build2
172 files changed, 419 insertions, 531 deletions
diff --git a/BRANCHES b/BRANCHES
deleted file mode 100644
index b1e85760..00000000
--- 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 0452133f..3cd939ac 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 00000000..11697107
--- /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 d4542ddc..1cd89db7 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 7de65550..acee3e17 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 <brian@stafford.uklinux.net>
dnl
dnl based on version by Caolan McNamara <caolan@skynet.ie>
diff --git a/autogen.sh b/autogen.sh
index 3bc484b5..c584309f 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 65b5f4ee..aff33d29 100644
--- a/command.cfg.in
+++ b/command.cfg.in
@@ -1,8 +1,6 @@
###############################################################################
# COMMAND CONFIGURATION
#
-# $Id$
-#
# SYNTAX:
# command[<command_name>]=<command_line>
#
diff --git a/configure.in b/configure.in
index 7687ae6e..203166e4 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 d7f8d0c3..e3c47bee 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 2b6990f7..6bf17662 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 6df4c7a1..9277686c 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 (<CMD>) {
}
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 b78ec68f..c41c4a8a 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 fb418ee3..1b02ea3c 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 476a0c36..0bd13909 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 5bddb87c..19f8e7f0 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 ee958d30..21c5267b 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 157d028a..60e14812 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 f03398ea..9d3b5743 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 1bbab60b..922e7187 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 cc1325ba..0edbdcaf 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 f29c0d1d..1f0fb455 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 = <<EOHELP ;
Copyright (c) 2004 Karl DeBisschop/S Hopcroft
@@ -345,7 +344,7 @@ sub usage {
}
sub version () {
- print_revision($PROGNAME,'$Revision$ ');
+ print_revision($PROGNAME,'$Revision: 1097 $ ');
exit $ERRORS{'OK'};
}
diff --git a/contrib/check_inodes-freebsd.pl b/contrib/check_inodes-freebsd.pl
index 6dc83754..d66e5e3f 100644
--- a/contrib/check_inodes-freebsd.pl
+++ b/contrib/check_inodes-freebsd.pl
@@ -41,7 +41,7 @@ GetOptions
if ($opt_V) {
- print_revision($PROGNAME,'$Revision$ ');
+ print_revision($PROGNAME,'$Revision: 72 $ ');
exit $ERRORS{'OK'};
}
@@ -114,7 +114,7 @@ sub print_usage () {
}
sub print_help () {
- print_revision($PROGNAME,'$Revision$');
+ print_revision($PROGNAME,'$Revision: 72 $');
print "Copyright (c) 2002 Andrew Ryder\n";
print "\n";
print_usage();
diff --git a/contrib/check_javaproc.pl b/contrib/check_javaproc.pl
index a9b52bc9..b68764ef 100644
--- a/contrib/check_javaproc.pl
+++ b/contrib/check_javaproc.pl
@@ -170,7 +170,7 @@ Perl Check java processes plugin for Nagios
}
sub revision() {
- print_revision($PROGNAME,'$Revision$ ');
+ print_revision($PROGNAME,'$Revision: 211 $ ');
}
sub version () {
diff --git a/contrib/check_joy.sh b/contrib/check_joy.sh
index cd076db9..8783a59f 100755
--- a/contrib/check_joy.sh
+++ b/contrib/check_joy.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=`echo '$Revision: 2 $' | sed -e 's/[^0-9.]//g'`
STATUS=""
. $PROGPATH/utils.sh
diff --git a/contrib/check_log2.pl b/contrib/check_log2.pl
index 61a11708..f1533a0c 100644
--- a/contrib/check_log2.pl
+++ b/contrib/check_log2.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#
-# $Id$
+# $Id: check_log2.pl 1300 2005-12-16 18:41:45Z harpermann $
#
# Log file regular expression detector for Nagios.
# Written by Aaron Bostick (abostick@mydoconline.com)
@@ -77,7 +77,7 @@ sub print_help ();
$neg_re_pattern = '';
$pattern_count = 0;
$pattern_line = '';
- $plugin_revision = '$Revision$ ';
+ $plugin_revision = '$Revision: 1300 $ ';
# Grab options from command line
GetOptions
diff --git a/contrib/check_lotus.pl b/contrib/check_lotus.pl
index c94e6c2d..8bedced8 100755
--- a/contrib/check_lotus.pl
+++ b/contrib/check_lotus.pl
@@ -1,8 +1,7 @@
#!/usr/bin/perl -w
-# $Id$
+# $Id: check_lotus.pl 1096 2005-01-25 09:04:26Z stanleyhopcroft $
-# $Log$
# Revision 1.1 2005/01/25 09:04:26 stanleyhopcroft
# New plugin to check responsiveness of Louts Notes (v5 at least) servers
#
@@ -219,7 +218,7 @@ sub print_usage () {
}
sub print_help () {
- print_revision($PROGNAME,'$Revision$ ');
+ print_revision($PROGNAME,'$Revision: 1096 $ ');
print "Copyright (c) 2004 Ed Rolison/S Hopcroft
Perl Check Lotus Notes plugin for Nagios.
@@ -250,7 +249,7 @@ Returns OK if the named server responds with its name.
}
sub version () {
- print_revision($PROGNAME,'$Revision$ ');
+ print_revision($PROGNAME,'$Revision: 1096 $ ');
exit $ERRORS{'OK'};
}
diff --git a/contrib/check_mem.pl b/contrib/check_mem.pl
index f0c82129..3227ce24 100644
--- a/contrib/check_mem.pl
+++ b/contrib/check_mem.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# $Id$
+# $Id: check_mem.pl 2 2002-02-28 06:42:51Z egalstad $
# check_mem.pl Copyright (C) 2000 Dan Larsson <dl@tyfon.net>
#
diff --git a/contrib/check_ms_spooler.pl b/contrib/check_ms_spooler.pl
index cf2464af..3a80a76a 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 24497b24..7ce90c8f 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 1175c1ed..3ba8d57a 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 0efdd1e8..8281a4e2 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 6fe0d9b0..57dde3f6 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=<HOST> [-w, --warning=<WARNING>] [-c, --critical=<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 6831b657..eec84ad8 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 728535a1..9d0da726 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 7a70f71a..9a2edaae 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 9fc5fedd..cc7943bf 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 c98ee7dc..0f445970 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 991fc715..4d19ff17 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 14b06a2b..6edae6ef 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 6cae859c..33470ea1 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 c8d497b0..569dc532 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 fe981237..7afeb232 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 <galmeida@linux.ime.usp.br>
*
- * Last Modified: $Date$
+ * Last Modified: $Date: 2002-02-28 21:42:56 -0500 (Thu, 28 Feb 2002) $
*
* Command line: CHECK_UPTIME <host_address>
*
@@ -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 <host_address>\n",argv[0]);
diff --git a/contrib/check_vcs.pl b/contrib/check_vcs.pl
index 7ee00728..38afdae2 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 0d11737f..f11f8645 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 cd1e830b..783b3333 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 73d795c9..db0f1c90 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 d923a305..00000000
--- 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 121549fc..ed7e4226 100644
--- a/doc/developer-guidelines.sgml
+++ b/doc/developer-guidelines.sgml
@@ -16,8 +16,8 @@
<revhistory>
<revision>
- <revnumber>$Revision$</revnumber>
- <date>$Date$</date>
+ <revnumber>1796</revnumber>
+ <date>2007-09-24 14:51:07 -0400 (Mon, 24 Sep 2007)</date>
</revision>
</revhistory>
diff --git a/lib/extra_opts.c b/lib/extra_opts.c
index 7e50c178..2939c7a1 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 <http://www.gnu.org/licenses/>.
*
-* $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 c19952db..1d64a506 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/lib/tests/test_base64.c b/lib/tests/test_base64.c
index 12b92686..5103d10d 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/lib/tests/test_cmd.c b/lib/tests/test_cmd.c
index 961da644..29ca42ac 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/lib/tests/test_disk.c b/lib/tests/test_disk.c
index 06c9baa9..d6042222 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/lib/tests/test_ini.c b/lib/tests/test_ini.c
index 76a948b4..c0853d7c 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/lib/tests/test_opts.c b/lib/tests/test_opts.c
index 6d6167eb..ad9a8548 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 <http://www.gnu.org/licenses/>.
*
-* $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 96947076..6cf93946 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/lib/tests/test_utils.c b/lib/tests/test_utils.c
index b2a9e69c..64efca23 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/lib/utils_base.c b/lib/utils_base.c
index 68f45675..d6437fc8 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/lib/utils_cmd.c b/lib/utils_cmd.c
index 5ba2f55e..e10ab918 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/lib/utils_disk.c b/lib/utils_disk.c
index ba2b21d7..3d20f4d4 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/lib/utils_tcp.c b/lib/utils_tcp.c
index 58d50b6a..8589ce67 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/plugins-root/Makefile.am b/plugins-root/Makefile.am
index 107d9933..de8813ff 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 35874a93..bdd348f2 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 <http://www.gnu.org/licenses/>.
*
-* $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 cc3f3d59..bbdfae75 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 <ae@op5.se>
*
-* 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 <http://www.gnu.org/licenses/>.
*
-* $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 <ae@op5.se>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins-root/t/check_icmp.t b/plugins-root/t/check_icmp.t
index 11535ea6..78bfd638 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 01fca20d..c9e3e40e 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 0e9cffb8..a4e8542c 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 4f8a9a73..3f531ac7 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 ca8883e5..dcd5efab 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 <koreth-nagios@midwinter.com>
#
@@ -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 ade5843c..54d933c7 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
index 75e852de..d0a1655a 100644..100755
--- 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 1a168bf0..bae3ffa7 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 7a90a96b..cc730cff 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 6f6e68c2..a1bfb486 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 c676e41a..95ef2ce1 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 fa15476b..9a8fc511 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 6872b932..ecdbdb1a 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 d4175f64..5c87e0a6 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 0a8f1521..664795eb 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 20c204de..d2701e95 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 = <CMD> ) {
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 7e1d3333..ae80fc44 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 fe217017..2671112a 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 89868684..80b93d9d 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 372b9f2e..384c276b 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 9fff0ee9..be8ae2f7 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 f37f567f..9c2c5695 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 08776f18..37cd62c3 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 85e4a5dd..59876902 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -1,5 +1,11 @@
## Process this file with automake to produce Makefile.in
+NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
+ @$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN
+-include NP-VERSION-FILE
+
+AM_CFLAGS = -DNP_VERSION='"$(NP_VERSION)"'
+
VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t
INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl @LDAPINCLUDE@ @PGINCLUDE@ @SSLINCLUDE@
@@ -65,10 +71,10 @@ check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS)
check_load_LDADD = $(BASEOBJS) popen.o
check_mrtg_LDADD = $(BASEOBJS)
check_mrtgtraf_LDADD = $(BASEOBJS)
-check_mysql_CFLAGS = $(MYSQLCFLAGS)
+check_mysql_CFLAGS = $(MYSQLCFLAGS) -DNP_VERSION='"$(NP_VERSION)"'
check_mysql_CPPFLAGS = $(MYSQLINCLUDE)
check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS)
-check_mysql_query_CFLAGS = $(MYSQLCFLAGS)
+check_mysql_query_CFLAGS = $(MYSQLCFLAGS) -DNP_VERSION='"$(NP_VERSION)"'
check_mysql_query_CPPFLAGS = $(MYSQLINCLUDE)
check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS)
check_nagios_LDADD = $(BASEOBJS) runcmd.o
@@ -153,7 +159,7 @@ getaddrinfo.o: getaddrinfo.h $(PLUGINHDRS)
gethostbyname.o: gethostbyname.h $(PLUGINHDRS)
-all-local: $(check_tcp_programs)
+all-local: $(check_tcp_programs) NP-VERSION-FILE
$(check_tcp_programs): check_tcp
rm -f $@
@@ -166,6 +172,10 @@ install-exec-hook:
clean-local:
rm -f $(check_tcp_programs)
+ rm -f NP-VERSION-FILE
uninstall-local:
cd $(DESTDIR)$(libexecdir) && rm -f $(check_tcp_programs)
+
+.PHONY: .FORCE-NP-VERSION-FILE
+
diff --git a/plugins/check_apt.c b/plugins/check_apt.c
index 49a7c4f7..3da54bcf 100644
--- a/plugins/check_apt.c
+++ b/plugins/check_apt.c
@@ -7,8 +7,6 @@
*
* Original author: Sean Finney
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_apt plugin
@@ -29,12 +27,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
-*
*****************************************************************************/
const char *progname = "check_apt";
-const char *revision = "$Revision$";
const char *copyright = "2006-2008";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -159,7 +154,7 @@ int process_arguments (int argc, char **argv) {
print_help();
exit(STATE_OK);
case 'V':
- print_revision(progname, revision);
+ print_revision(progname, NP_VERSION);
exit(STATE_OK);
case 'v':
verbose++;
@@ -404,7 +399,7 @@ char* construct_cmdline(upgrade_type u, const char *opts){
void
print_help (void)
{
- print_revision(progname, revision);
+ print_revision(progname, NP_VERSION);
printf(_(COPYRIGHT), copyright, email);
diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c
index ce62ebaf..d0dbf34a 100644
--- a/plugins/check_by_ssh.c
+++ b/plugins/check_by_ssh.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2008 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_by_ssh plugin
@@ -25,12 +23,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <kdebisschop@users.sourceforge.net>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_cluster.c b/plugins/check_cluster.c
index 04919e0d..01385886 100644
--- a/plugins/check_cluster.c
+++ b/plugins/check_cluster.c
@@ -6,9 +6,6 @@
* Copyright (c) 2000-2004 Ethan Galstad (nagios@nagios.org)
* Copyright (c) 2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
-*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@@ -22,12 +19,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_cluster";
-const char *revision = "$Revision$";
const char *copyright = "2000-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -204,7 +199,7 @@ int process_arguments(int argc, char **argv){
break;
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
break;
@@ -228,7 +223,7 @@ int process_arguments(int argc, char **argv){
void
print_help(void)
{
- print_revision(progname, revision);
+ print_revision(progname, NP_VERSION);
printf ("Copyright (c) 2000-2004 Ethan Galstad (nagios@nagios.org)\n");
printf(COPYRIGHT, copyright, email);
diff --git a/plugins/check_dig.c b/plugins/check_dig.c
index 34197ecc..08be9373 100644
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2002-2008 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_dig plugin
@@ -25,7 +23,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <kdebisschop@users.sourceforge.net>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 12b77a8a..98a061fb 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 1999-2008 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_disk plugin
@@ -25,13 +23,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index 6bedfefc..bb206a05 100644
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2008 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_dns plugin
@@ -28,12 +26,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_dummy.c b/plugins/check_dummy.c
index ff600a79..8c3f5354 100644
--- a/plugins/check_dummy.c
+++ b/plugins/check_dummy.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 1999-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_dummy plugin
@@ -27,12 +25,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_fping.c b/plugins/check_fping.c
index aeb2f936..75c7860d 100644
--- a/plugins/check_fping.c
+++ b/plugins/check_fping.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_disk plugin
@@ -28,12 +26,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <adrieder@sbox.tu-graz.ac.at>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_game.c b/plugins/check_game.c
index 2a23b742..235be65c 100644
--- a/plugins/check_game.c
+++ b/plugins/check_game.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2002-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_game plugin
@@ -28,12 +26,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_game";
-const char *revision = "$Revision$";
const char *copyright = "2002-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -202,7 +198,7 @@ process_arguments (int argc, char **argv)
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
case 'v': /* version */
verbose = TRUE;
@@ -293,7 +289,7 @@ validate_arguments (void)
void
print_help (void)
{
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf ("Copyright (c) 1999 Ian Cass, Knowledge Matters Limited\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c
index c815cc70..add9cc82 100644
--- a/plugins/check_hpjd.c
+++ b/plugins/check_hpjd.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_hpjd plugin
@@ -28,12 +26,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 0d499d93..f4a7e5e6 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 1999-2008 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_http plugin
@@ -30,14 +28,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_ide_smart.c b/plugins/check_ide_smart.c
index b0a7ef6c..b0b01890 100644
--- a/plugins/check_ide_smart.c
+++ b/plugins/check_ide_smart.c
@@ -9,8 +9,6 @@
* Copyright (c) 2000 Robert Dale <rdale@digital-mission.com>
* 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 <http://www.gnu.org/licenses/>.
*
-* $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 <rdale@digital-mission.com>\n");
printf ("(C) 1999 Ragnar Hojland Espinosa <ragnar@lightside.dhis.org>\n");
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c
index d0134a09..7ef4509c 100644
--- a/plugins/check_ldap.c
+++ b/plugins/check_ldap.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2008 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_ldap plugin
@@ -25,13 +23,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
/* progname may be check_ldaps */
char *progname = "check_ldap";
-const char *revision = "$Revision$";
const char *copyright = "2000-2008";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -289,7 +285,7 @@ process_arguments (int argc, char **argv)
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
case 't': /* timeout period */
if (!is_intnonneg (optarg))
@@ -390,7 +386,7 @@ print_help (void)
char *myport;
asprintf (&myport, "%d", DEFAULT_PORT);
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf ("Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_load.c b/plugins/check_load.c
index 5ff9a8c0..940d37ec 100644
--- a/plugins/check_load.c
+++ b/plugins/check_load.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 1999-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_load plugin
@@ -27,12 +25,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <galmeida@linux.ime.usp.br>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c
index a0bdbeba..550326b1 100644
--- a/plugins/check_mrtg.c
+++ b/plugins/check_mrtg.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 1999-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_mrtg plugin
@@ -28,12 +26,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_mrtgtraf.c b/plugins/check_mrtgtraf.c
index 1911d568..3232f1e7 100644
--- a/plugins/check_mrtgtraf.c
+++ b/plugins/check_mrtgtraf.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 1999-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_mtrgtraf plugin
@@ -28,7 +26,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 77f3b89b..a1a63769 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -7,8 +7,6 @@
* Copyright (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net)
* Copyright (c) 1999-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_mysql plugin
@@ -29,12 +27,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_mysql";
-const char *revision = "$Revision$";
const char *copyright = "1999-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -310,7 +306,7 @@ process_arguments (int argc, char **argv)
critical = optarg;
break;
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
case 'h': /* help */
print_help ();
@@ -377,7 +373,7 @@ print_help (void)
char *myport;
asprintf (&myport, "%d", MYSQL_PORT);
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf (_(COPYRIGHT), copyright, email);
diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c
index a92b8570..802e3456 100644
--- a/plugins/check_mysql_query.c
+++ b/plugins/check_mysql_query.c
@@ -6,8 +6,6 @@
* Copyright (c) 2006-2007 Nagios Plugins Development Team
* Original code from check_mysql, copyright 1999 Didi Rieder
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_mysql_query plugin
@@ -28,12 +26,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_mysql_query";
-const char *revision = "$Revision$";
const char *copyright = "1999-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -231,7 +227,7 @@ process_arguments (int argc, char **argv)
verbose++;
break;
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
case 'h': /* help */
print_help ();
@@ -286,7 +282,7 @@ print_help (void)
char *myport;
asprintf (&myport, "%d", MYSQL_PORT);
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf (_(COPYRIGHT), copyright, email);
diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c
index a2debe21..954ff711 100644
--- a/plugins/check_nagios.c
+++ b/plugins/check_nagios.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 1999-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_nagios plugin
@@ -31,12 +29,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_nagios";
-const char *revision = "$Revision$";
const char *copyright = "1999-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -240,7 +236,7 @@ process_arguments (int argc, char **argv)
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
case 'F': /* status log */
status_log = optarg;
@@ -278,7 +274,7 @@ process_arguments (int argc, char **argv)
void
print_help (void)
{
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf (_(COPYRIGHT), copyright, email);
diff --git a/plugins/check_nt.c b/plugins/check_nt.c
index a0e5c119..4d9157a6 100644
--- a/plugins/check_nt.c
+++ b/plugins/check_nt.c
@@ -6,8 +6,6 @@
* Copyright (c) 2000-2002 Yves Rubin (rubiyz@yahoo.com)
* Copyright (c) 2003-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_nt plugin
@@ -31,12 +29,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_nt";
-const char *revision = "$Revision$";
const char *copyright = "2000-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -517,7 +513,7 @@ int process_arguments(int argc, char **argv){
print_help();
exit(STATE_OK);
case 'V': /* version */
- print_revision(progname,revision);
+ print_revision(progname, NP_VERSION);
exit(STATE_OK);
case 'H': /* hostname */
if (server_address) free(server_address);
@@ -637,7 +633,7 @@ void preparelist(char *string) {
void print_help(void)
{
- print_revision(progname,revision);
+ print_revision(progname, NP_VERSION);
printf ("Copyright (c) 2000 Yves Rubin (rubiyz@yahoo.com)\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c
index 20ecf64f..ada7f0c3 100644
--- a/plugins/check_ntp.c
+++ b/plugins/check_ntp.c
@@ -6,8 +6,6 @@
* Copyright (c) 2006 Sean Finney <seanius@seanius.net>
* 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_ntp";
-const char *revision = "$Revision$";
const char *copyright = "2006-2008";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -682,7 +678,7 @@ int process_arguments(int argc, char **argv){
exit(STATE_OK);
break;
case 'V':
- print_revision(progname, revision);
+ print_revision(progname, NP_VERSION);
exit(STATE_OK);
break;
case 'v':
@@ -836,7 +832,7 @@ int main(int argc, char *argv[]){
void print_help(void){
- print_revision(progname, revision);
+ print_revision(progname, NP_VERSION);
printf ("Copyright (c) 2006 Sean Finney\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c
index 17876dd8..acca17b5 100644
--- a/plugins/check_ntp_peer.c
+++ b/plugins/check_ntp_peer.c
@@ -6,8 +6,6 @@
* Copyright (c) 2006 Sean Finney <seanius@seanius.net>
* 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_ntp_peer";
-const char *revision = "$Revision$";
const char *copyright = "2006-2008";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -492,7 +488,7 @@ int process_arguments(int argc, char **argv){
exit(STATE_OK);
break;
case 'V':
- print_revision(progname, revision);
+ print_revision(progname, NP_VERSION);
exit(STATE_OK);
break;
case 'v':
@@ -671,7 +667,7 @@ int main(int argc, char *argv[]){
void print_help(void){
- print_revision(progname, revision);
+ print_revision(progname, NP_VERSION);
printf ("Copyright (c) 2006 Sean Finney\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c
index a5b122f3..c7c7a754 100644
--- a/plugins/check_ntp_time.c
+++ b/plugins/check_ntp_time.c
@@ -6,8 +6,6 @@
* Copyright (c) 2006 Sean Finney <seanius@seanius.net>
* 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 <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_ntp_time";
-const char *revision = "$Revision$";
const char *copyright = "2006-2008";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -476,7 +472,7 @@ int process_arguments(int argc, char **argv){
exit(STATE_OK);
break;
case 'V':
- print_revision(progname, revision);
+ print_revision(progname, NP_VERSION);
exit(STATE_OK);
break;
case 'v':
@@ -594,7 +590,7 @@ int main(int argc, char *argv[]){
}
void print_help(void){
- print_revision(progname, revision);
+ print_revision(progname, NP_VERSION);
printf ("Copyright (c) 2006 Sean Finney\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c
index c0e5ece9..72a47b16 100644
--- a/plugins/check_nwstat.c
+++ b/plugins/check_nwstat.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_nwstat plugin
@@ -28,12 +26,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_overcr.c b/plugins/check_overcr.c
index af04d3b4..1d9ec8cf 100644
--- a/plugins/check_overcr.c
+++ b/plugins/check_overcr.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_overcr plugin
@@ -28,12 +26,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index 869ef673..abe721bf 100644
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 1999-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_pgsql plugin
@@ -27,12 +25,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_pgsql";
-const char *revision = "$Revision$";
const char *copyright = "1999-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -231,7 +227,7 @@ process_arguments (int argc, char **argv)
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
case 't': /* timeout period */
if (!is_integer (optarg))
@@ -404,7 +400,7 @@ print_help (void)
asprintf (&myport, "%d", DEFAULT_PORT);
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index c457ad64..8c4c0e64 100644
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_ping plugin
@@ -27,12 +25,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 4aaeddb2..4c729501 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2008 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_procs plugin
@@ -30,13 +28,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_radius.c b/plugins/check_radius.c
index e0b0e2c2..98f6bf98 100644
--- a/plugins/check_radius.c
+++ b/plugins/check_radius.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 1999-2008 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_radius plugin
@@ -27,12 +25,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_radius";
-const char *revision = "$Revision$";
const char *copyright = "2000-2008";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -239,7 +235,7 @@ process_arguments (int argc, char **argv)
print_help ();
exit (OK);
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (OK);
case 'v': /* verbose mode */
verbose = TRUE;
@@ -312,7 +308,7 @@ print_help (void)
char *myport;
asprintf (&myport, "%d", PW_AUTH_UDP_PORT);
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf ("Copyright (c) 1999 Robert August Vincent II\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_real.c b/plugins/check_real.c
index d333c2a3..cbc3103c 100644
--- a/plugins/check_real.c
+++ b/plugins/check_real.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_real plugin
@@ -27,12 +25,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <leite@cic.ua.pt>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index 4986fe65..6040aa12 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_smtp plugin
@@ -27,12 +25,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 0aafd951..1c92534c 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 1999-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_snmp plugin
@@ -27,12 +25,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_snmp";
-const char *revision = "$Revision$";
const char *copyright = "1999-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -475,7 +471,7 @@ process_arguments (int argc, char **argv)
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
case 'v': /* verbose */
verbose = TRUE;
@@ -928,7 +924,7 @@ nextarg (char *str)
void
print_help (void)
{
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index 2e16e651..04cc4d97 100644
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_ssh plugin
@@ -27,12 +25,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <remi@sinfomic.fr>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index f0269633..be20ca32 100644
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
@@ -6,8 +6,6 @@
* Copyright (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net)
* Copyright (c) 2000-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_disk plugin
@@ -26,12 +24,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_swap";
-const char *revision = "$Revision$";
const char *copyright = "2000-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -463,7 +459,7 @@ process_arguments (int argc, char **argv)
verbose++;
break;
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
case 'h': /* help */
print_help ();
@@ -522,7 +518,7 @@ validate_arguments (void)
void
print_help (void)
{
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf (_(COPYRIGHT), copyright, email);
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index 0d81497e..31659f18 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 1999-2008 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_tcp plugin
@@ -31,7 +29,6 @@
/* progname "check_tcp" changes depending on symlink called */
char *progname;
-const char *revision = "$Revision$";
const char *copyright = "1999-2008";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -451,7 +448,7 @@ process_arguments (int argc, char **argv)
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
case 'v': /* verbose mode */
flags |= FLAG_VERBOSE;
@@ -592,7 +589,7 @@ process_arguments (int argc, char **argv)
void
print_help (void)
{
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_time.c b/plugins/check_time.c
index f9a292c0..ee938168 100644
--- a/plugins/check_time.c
+++ b/plugins/check_time.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 1999-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_time plugin
@@ -27,12 +25,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_time";
-const char *revision = "$Revision$";
const char *copyright = "1999-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -237,7 +233,7 @@ process_arguments (int argc, char **argv)
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
case 'H': /* hostname */
if (is_host (optarg) == FALSE)
@@ -335,7 +331,7 @@ print_help (void)
char *myport;
asprintf (&myport, "%d", TIME_PORT);
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf ("Copyright (c) 1999 Ethan Galstad\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_ups.c b/plugins/check_ups.c
index a498d203..7311ca23 100644
--- a/plugins/check_ups.c
+++ b/plugins/check_ups.c
@@ -8,8 +8,6 @@
* 2004 Arnaud Quette <arnaud.quette@mgeups.com>
* 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 <http://www.gnu.org/licenses/>.
*
-* $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 <alain.richard@equation.fr>\n");
diff --git a/plugins/check_users.c b/plugins/check_users.c
index 4e7e9a29..1bd2c8b2 100644
--- a/plugins/check_users.c
+++ b/plugins/check_users.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_users plugin
@@ -29,12 +27,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_users";
-const char *revision = "$Revision$";
const char *copyright = "2000-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -163,7 +159,7 @@ process_arguments (int argc, char **argv)
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
case 'c': /* critical */
if (!is_intnonneg (optarg))
@@ -203,7 +199,7 @@ process_arguments (int argc, char **argv)
void
print_help (void)
{
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf ("Copyright (c) 1999 Ethan Galstad\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/common.h b/plugins/common.h
index 0711dbf1..dfc09416 100644
--- a/plugins/common.h
+++ b/plugins/common.h
@@ -6,8 +6,6 @@
* Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)
* Copyright (c) 2003-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains common include files and defines used in many of
@@ -27,7 +25,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/plugins/negate.c b/plugins/negate.c
index 40ff1912..0808b685 100644
--- a/plugins/negate.c
+++ b/plugins/negate.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2002-2008 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the negate plugin
@@ -28,12 +26,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "negate";
-const char *revision = "$Revision$";
const char *copyright = "2002-2008";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -155,7 +151,7 @@ process_arguments (int argc, char **argv)
exit (EXIT_SUCCESS);
break;
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (EXIT_SUCCESS);
case 't': /* timeout period */
if (!is_integer (optarg))
@@ -233,7 +229,7 @@ translate_state (char *state_text)
void
print_help (void)
{
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/netutils.c b/plugins/netutils.c
index 1a5547e9..6082cae0 100644
--- a/plugins/netutils.c
+++ b/plugins/netutils.c
@@ -6,8 +6,6 @@
* Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)
* Copyright (c) 2003-2008 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains commons functions used in many of the plugins.
@@ -26,7 +24,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/plugins/netutils.h b/plugins/netutils.h
index 4c0a563c..85c92fc0 100644
--- a/plugins/netutils.h
+++ b/plugins/netutils.h
@@ -6,8 +6,6 @@
* Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)
* Copyright (c) 2003-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains common include files and function definitions
@@ -27,7 +25,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/plugins/popen.c b/plugins/popen.c
index a27aecc9..716bd524 100644
--- a/plugins/popen.c
+++ b/plugins/popen.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2005-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* A safe alternative to popen
@@ -37,7 +35,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/plugins/popen.h b/plugins/popen.h
index 8b09edd9..fc7e78e2 100644
--- a/plugins/popen.h
+++ b/plugins/popen.h
@@ -1,6 +1,5 @@
/******************************************************************************
*
-* $Id$
*
*****************************************************************************/
diff --git a/plugins/runcmd.c b/plugins/runcmd.c
index 8c52b5c9..7574b121 100644
--- a/plugins/runcmd.c
+++ b/plugins/runcmd.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2005-2006 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description :
*
* A simple interface to executing programs from other programs, using an
@@ -35,7 +33,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/plugins/runcmd.h b/plugins/runcmd.h
index a048def3..211dee2c 100644
--- a/plugins/runcmd.h
+++ b/plugins/runcmd.h
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/plugins/sslutils.c b/plugins/sslutils.c
index 3d4f9016..f5035e23 100644
--- a/plugins/sslutils.c
+++ b/plugins/sslutils.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2005-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains common functions for plugins that require SSL.
@@ -25,7 +23,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
diff --git a/plugins/t/check_by_ssh.t b/plugins/t/check_by_ssh.t
index b421d334..5f2c534d 100644
--- a/plugins/t/check_by_ssh.t
+++ b/plugins/t/check_by_ssh.t
@@ -2,7 +2,6 @@
#
# check_by_ssh tests
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_cluster.t b/plugins/t/check_cluster.t
index f3e78b83..4736f067 100644
--- a/plugins/t/check_cluster.t
+++ b/plugins/t/check_cluster.t
@@ -2,7 +2,6 @@
#
# check_cluster tests
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_dig.t b/plugins/t/check_dig.t
index 937eec33..323859e8 100644
--- a/plugins/t/check_dig.t
+++ b/plugins/t/check_dig.t
@@ -2,7 +2,6 @@
#
# Domain Name Server (DNS) Tests via check_dig
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t
index 99c434ac..45c6a613 100644
--- a/plugins/t/check_disk.t
+++ b/plugins/t/check_disk.t
@@ -2,7 +2,6 @@
#
# Disk Space Tests via check_disk
#
-# $Id$
#
# TODO: Add in tests for perf data. Need to beef up Nagios::Plugin::Performance to cater for max, min, etc
diff --git a/plugins/t/check_dns.t b/plugins/t/check_dns.t
index fc89e6e5..64aaf0ce 100644
--- a/plugins/t/check_dns.t
+++ b/plugins/t/check_dns.t
@@ -2,7 +2,6 @@
#
# Domain Name Server (DNS) Tests via check_dns
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_dummy.t b/plugins/t/check_dummy.t
index aaa7a410..15fc1578 100644
--- a/plugins/t/check_dummy.t
+++ b/plugins/t/check_dummy.t
@@ -2,7 +2,6 @@
#
# check_dummy tests
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_fping.t b/plugins/t/check_fping.t
index c59d59e0..45a9be8a 100644
--- a/plugins/t/check_fping.t
+++ b/plugins/t/check_fping.t
@@ -2,7 +2,6 @@
#
# FPing Tests via check_fping
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_ftp.t b/plugins/t/check_ftp.t
index 47a73e13..de6831ba 100644
--- a/plugins/t/check_ftp.t
+++ b/plugins/t/check_ftp.t
@@ -2,7 +2,6 @@
#
# File Transfer Protocol (FTP) Test via check_ftp
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_hpjd.t b/plugins/t/check_hpjd.t
index 2fe56000..10ded54a 100644
--- a/plugins/t/check_hpjd.t
+++ b/plugins/t/check_hpjd.t
@@ -2,7 +2,6 @@
#
# HP JetDirect Test via check_hpjd
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t
index c98b4ac3..c43a64a9 100644
--- a/plugins/t/check_http.t
+++ b/plugins/t/check_http.t
@@ -2,7 +2,6 @@
#
# HyperText Transfer Protocol (HTTP) Test via check_http
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_imap.t b/plugins/t/check_imap.t
index fa957d1b..9c6eae1f 100644
--- a/plugins/t/check_imap.t
+++ b/plugins/t/check_imap.t
@@ -2,7 +2,6 @@
#
# Internet Mail Access Protocol (IMAP) Server Tests via check_imap
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_jabber.t b/plugins/t/check_jabber.t
index 6a3d4ef7..1aaf8125 100644
--- a/plugins/t/check_jabber.t
+++ b/plugins/t/check_jabber.t
@@ -2,7 +2,6 @@
#
# Jabber Server Tests via check_jabber
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_load.t b/plugins/t/check_load.t
index 8987b84c..55f6f752 100644
--- a/plugins/t/check_load.t
+++ b/plugins/t/check_load.t
@@ -2,7 +2,6 @@
#
# Load Average Tests via check_load
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_mysql.t b/plugins/t/check_mysql.t
index e8bccf1c..d9716458 100644
--- a/plugins/t/check_mysql.t
+++ b/plugins/t/check_mysql.t
@@ -2,7 +2,6 @@
#
# MySQL Database Server Tests via check_mysql
#
-# $Id$
#
#
# These are the database permissions required for this test:
diff --git a/plugins/t/check_mysql_query.t b/plugins/t/check_mysql_query.t
index f78f07b8..407af881 100644
--- a/plugins/t/check_mysql_query.t
+++ b/plugins/t/check_mysql_query.t
@@ -2,7 +2,6 @@
#
# MySQL Database Server Tests via check_mysql
#
-# $Id$
#
#
# These are the database permissions required for this test:
diff --git a/plugins/t/check_nagios.t b/plugins/t/check_nagios.t
index d5d48465..81fc24d8 100644
--- a/plugins/t/check_nagios.t
+++ b/plugins/t/check_nagios.t
@@ -2,7 +2,6 @@
#
# check_nagios tests
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_ntp.t b/plugins/t/check_ntp.t
index 4f86ab97..b71c8631 100644
--- a/plugins/t/check_ntp.t
+++ b/plugins/t/check_ntp.t
@@ -2,7 +2,6 @@
#
# Testing NTP
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_ping.t b/plugins/t/check_ping.t
index c9a09041..e1c119e4 100644
--- a/plugins/t/check_ping.t
+++ b/plugins/t/check_ping.t
@@ -2,7 +2,6 @@
#
# Ping Response Tests via check_ping
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_pop.t b/plugins/t/check_pop.t
index b78291da..62352fd1 100644
--- a/plugins/t/check_pop.t
+++ b/plugins/t/check_pop.t
@@ -2,7 +2,6 @@
#
# Post Office Protocol (POP) Server Tests via check_pop
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_procs.t b/plugins/t/check_procs.t
index 2a41ac5c..fc32952d 100644
--- a/plugins/t/check_procs.t
+++ b/plugins/t/check_procs.t
@@ -2,7 +2,6 @@
#
# Process Tests via check_procs
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_smtp.t b/plugins/t/check_smtp.t
index ff58bc0b..aa6dae45 100644
--- a/plugins/t/check_smtp.t
+++ b/plugins/t/check_smtp.t
@@ -2,7 +2,6 @@
#
# Simple Mail Transfer Protocol (SMTP) Test via check_smtp
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_snmp.t b/plugins/t/check_snmp.t
index 4e831397..369314ec 100644
--- a/plugins/t/check_snmp.t
+++ b/plugins/t/check_snmp.t
@@ -2,7 +2,6 @@
#
# Simple Network Management Protocol (SNMP) Test via check_snmp
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_swap.t b/plugins/t/check_swap.t
index 435730fc..e44adc90 100644
--- a/plugins/t/check_swap.t
+++ b/plugins/t/check_swap.t
@@ -2,7 +2,6 @@
#
# Swap Space Tests via check_swap
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_tcp.t b/plugins/t/check_tcp.t
index 2914350e..fd2b5dd9 100644
--- a/plugins/t/check_tcp.t
+++ b/plugins/t/check_tcp.t
@@ -2,7 +2,6 @@
#
# TCP Connection Based Tests via check_tcp
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_time.t b/plugins/t/check_time.t
index f7fcf959..961f56e6 100644
--- a/plugins/t/check_time.t
+++ b/plugins/t/check_time.t
@@ -2,7 +2,6 @@
#
# System Time Tests via check_time
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_udp.t b/plugins/t/check_udp.t
index e8a1e394..6d24675a 100644
--- a/plugins/t/check_udp.t
+++ b/plugins/t/check_udp.t
@@ -2,7 +2,6 @@
#
# UDP Connection Based Tests via check_udp
#
-# $Id$
#
use strict;
diff --git a/plugins/t/check_users.t b/plugins/t/check_users.t
index 4b313d30..cf7fac92 100644
--- a/plugins/t/check_users.t
+++ b/plugins/t/check_users.t
@@ -2,7 +2,6 @@
#
# Logged in Users Tests via check_users
#
-# $Id$
#
use strict;
diff --git a/plugins/t/negate.t b/plugins/t/negate.t
index 3a894f55..989bf01f 100644
--- a/plugins/t/negate.t
+++ b/plugins/t/negate.t
@@ -3,8 +3,6 @@
# negate checks
# Need check_dummy to work for testing
#
-# $Id: negate.pl 1717 2007-05-24 08:53:50Z tonvoon $
-#
use strict;
use Test::More;
diff --git a/plugins/urlize.c b/plugins/urlize.c
index aeabafd0..a3620082 100644
--- a/plugins/urlize.c
+++ b/plugins/urlize.c
@@ -5,8 +5,6 @@
* License: GPL
* Copyright (c) 2000-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the urlize plugin
@@ -29,12 +27,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $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 <kdebisschop@users.sourceforge.net>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/utils.c b/plugins/utils.c
index c8f3a00d..1900ef86 100644
--- a/plugins/utils.c
+++ b/plugins/utils.c
@@ -6,9 +6,6 @@
* Copyright (c) 2000 Karl DeBisschop (karl@debisschop.net)
* Copyright (c) 2002-2007 Nagios Plugin Development Team
*
-* Last Modified: $Date$
-*
-*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@@ -22,7 +19,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
@@ -142,24 +138,13 @@ usage5 (void)
exit (STATE_UNKNOWN);
}
-char *
-clean_revstring (const char *revstring)
-{
- char plugin_revision[STRLEN];
- plugin_revision[0] = 'v';
- if (sscanf (revstring,"$Revision: %[0-9.]", plugin_revision + 1) == 1)
- return strscpy (NULL, plugin_revision);
- else
- return strscpy (NULL, "N/A");
-}
-
void
-print_revision (const char *command_name, const char *revision_string)
+print_revision (const char *command_name, const char *revision)
{
char plugin_revision[STRLEN];
- printf ("%s %s (%s %s)\n",
- command_name, clean_revstring(revision_string), PACKAGE, VERSION);
+ printf ("%s v%s (%s %s)\n",
+ command_name, revision, PACKAGE, VERSION);
}
const char *
diff --git a/plugins/utils.h b/plugins/utils.h
index 67e099d4..65e06ebd 100644
--- a/plugins/utils.h
+++ b/plugins/utils.h
@@ -26,10 +26,7 @@ suite of plugins. */
/* Standardize version information, termination */
-/* $Id$ */
-
void support (void);
-char *clean_revstring (const char *);
void print_revision (const char *, const char *);
/* Handle timeouts */
diff --git a/test.pl.in b/test.pl.in
index 22d0576d..a0228185 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 21d58461..98c243b0 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 00000000..c90ea96e
--- /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 <dermoth@aei.ca>
+#
+# 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 <http://www.gnu.org/licenses/>.
+
+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 = <SAVHASH>;
+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 (<REVLIST>) {
+ 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 cd675389..6f3c5d02 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 6db4c6c5..cdaa9c92 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 c1d40c69..ab4234aa 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);