summaryrefslogtreecommitdiffstats
path: root/plugins-scripts
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-11-23 05:38:47 (GMT)
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-11-23 05:38:47 (GMT)
commit6fbd14fea5c111a23d9074d25499991cbfa58f79 (patch)
tree0c1f5a77cacc664eadd47216b70e3257337484db /plugins-scripts
parent56cf151ae91c5081a99365848a3f060dfe14a68c (diff)
downloadmonitoring-plugins-6fbd14fea5c111a23d9074d25499991cbfa58f79.tar.gz
Removing CVS/SVN tags and replacing with git-based versioning
For contrib/, full tags have been imported from subversion git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins-scripts')
-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
22 files changed, 48 insertions, 51 deletions
diff --git a/plugins-scripts/Makefile.am b/plugins-scripts/Makefile.am
index 01fca20..c9e3e40 100644
--- a/plugins-scripts/Makefile.am
+++ b/plugins-scripts/Makefile.am
@@ -1,5 +1,11 @@
1## Process this file with automake to produce Makefile.in 1## Process this file with automake to produce Makefile.in
2 2
3NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
4 @$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN
5-include NP-VERSION-FILE
6
7export NP_VERSION:= $(NP_VERSION)
8
3SUFFIXES = .pl .sh 9SUFFIXES = .pl .sh
4 10
5VPATH=$(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t 11VPATH=$(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t
@@ -18,6 +24,8 @@ TESTS_ENVIRONMENT=perl -I $(top_builddir) -I $(top_srcdir)
18 24
19TESTS = @SCRIPT_TEST@ 25TESTS = @SCRIPT_TEST@
20 26
27all-local: NP-VERSION-FILE
28
21test: 29test:
22 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl 30 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
23 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl t/utils.t # utils.t is excluded from above, so manually ask to test 31 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)
35.sh : 43.sh :
36 $(AWK) -f ./subst $< > $@ 44 $(AWK) -f ./subst $< > $@
37 chmod +x $@ 45 chmod +x $@
46
47clean-local:
48 rm -f NP-VERSION-FILE
49
50.PHONY: .FORCE-NP-VERSION-FILE
diff --git a/plugins-scripts/check_breeze.pl b/plugins-scripts/check_breeze.pl
index 0e9cffb..a4e8542 100755
--- a/plugins-scripts/check_breeze.pl
+++ b/plugins-scripts/check_breeze.pl
@@ -26,7 +26,7 @@ GetOptions
26 "C=s" => \$opt_C, "community=s" => \$opt_C); 26 "C=s" => \$opt_C, "community=s" => \$opt_C);
27 27
28if ($opt_V) { 28if ($opt_V) {
29 print_revision($PROGNAME,'$Revision$'); 29 print_revision($PROGNAME,'@NP_VERSION@');
30 exit $ERRORS{'OK'}; 30 exit $ERRORS{'OK'};
31} 31}
32 32
@@ -65,7 +65,7 @@ sub print_usage () {
65} 65}
66 66
67sub print_help () { 67sub print_help () {
68 print_revision($PROGNAME,'$Revision$'); 68 print_revision($PROGNAME,'@NP_VERSION@');
69 print "Copyright (c) 2000 Jeffrey Blank/Karl DeBisschop 69 print "Copyright (c) 2000 Jeffrey Blank/Karl DeBisschop
70 70
71This plugin reports the signal strength of a Breezecom wireless equipment 71This plugin reports the signal strength of a Breezecom wireless equipment
diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl
index 4f8a9a7..3f531ac 100755
--- a/plugins-scripts/check_disk_smb.pl
+++ b/plugins-scripts/check_disk_smb.pl
@@ -16,7 +16,6 @@
16# drives is a pain in the butt 16# drives is a pain in the butt
17# 2-May-2002 - SGhosh fix for embedded perl 17# 2-May-2002 - SGhosh fix for embedded perl
18# 18#
19# $Id$
20# 19#
21 20
22require 5.004; 21require 5.004;
@@ -52,7 +51,7 @@ GetOptions
52 "H=s" => \$opt_H, "hostname=s" => \$opt_H); 51 "H=s" => \$opt_H, "hostname=s" => \$opt_H);
53 52
54if ($opt_V) { 53if ($opt_V) {
55 print_revision($PROGNAME,'$Revision$'); #' 54 print_revision($PROGNAME,'@NP_VERSION@'); #'
56 exit $ERRORS{'OK'}; 55 exit $ERRORS{'OK'};
57} 56}
58 57
@@ -243,7 +242,7 @@ sub print_usage () {
243} 242}
244 243
245sub print_help () { 244sub print_help () {
246 print_revision($PROGNAME,'$Revision$'); 245 print_revision($PROGNAME,'@NP_VERSION@');
247 print "Copyright (c) 2000 Michael Anthon/Karl DeBisschop 246 print "Copyright (c) 2000 Michael Anthon/Karl DeBisschop
248 247
249Perl Check SMB Disk plugin for Nagios 248Perl Check SMB Disk plugin for Nagios
diff --git a/plugins-scripts/check_file_age.pl b/plugins-scripts/check_file_age.pl
index ca8883e..dcd5efa 100755
--- a/plugins-scripts/check_file_age.pl
+++ b/plugins-scripts/check_file_age.pl
@@ -1,5 +1,4 @@
1#!/bin/perl -w 1#!/bin/perl -w
2# $Id$
3 2
4# check_file_age.pl Copyright (C) 2003 Steven Grimm <koreth-nagios@midwinter.com> 3# check_file_age.pl Copyright (C) 2003 Steven Grimm <koreth-nagios@midwinter.com>
5# 4#
@@ -55,7 +54,7 @@ GetOptions(
55 "C=f" => \$opt_C, "critical-size=f" => \$opt_C); 54 "C=f" => \$opt_C, "critical-size=f" => \$opt_C);
56 55
57if ($opt_V) { 56if ($opt_V) {
58 print_revision($PROGNAME, '$Revision$'); 57 print_revision($PROGNAME, '@NP_VERSION@');
59 exit $ERRORS{'OK'}; 58 exit $ERRORS{'OK'};
60} 59}
61 60
@@ -102,7 +101,7 @@ sub print_usage () {
102} 101}
103 102
104sub print_help () { 103sub print_help () {
105 print_revision($PROGNAME, '$Revision$'); 104 print_revision($PROGNAME, '@NP_VERSION@');
106 print "Copyright (c) 2003 Steven Grimm\n\n"; 105 print "Copyright (c) 2003 Steven Grimm\n\n";
107 print_usage(); 106 print_usage();
108 print "\n"; 107 print "\n";
diff --git a/plugins-scripts/check_flexlm.pl b/plugins-scripts/check_flexlm.pl
index ade5843..54d933c 100755
--- a/plugins-scripts/check_flexlm.pl
+++ b/plugins-scripts/check_flexlm.pl
@@ -26,7 +26,6 @@
26# initial version: 9-10-99 Ernst-Dieter Martin edmt@infineon.com 26# initial version: 9-10-99 Ernst-Dieter Martin edmt@infineon.com
27# 27#
28# License: GPL 28# License: GPL
29# $Id$
30# 29#
31# lmstat output patches from Steve Rigler/Cliff Rice 13-Apr-2002 30# lmstat output patches from Steve Rigler/Cliff Rice 13-Apr-2002
32# srigler@marathonoil.com,cerice@marathonoil.com 31# srigler@marathonoil.com,cerice@marathonoil.com
@@ -57,7 +56,7 @@ GetOptions
57 "t=i" => \$opt_t, "timeout=i" => \$opt_t); 56 "t=i" => \$opt_t, "timeout=i" => \$opt_t);
58 57
59if ($opt_V) { 58if ($opt_V) {
60 print_revision($PROGNAME,'$Revision$'); 59 print_revision($PROGNAME,'@NP_VERSION@');
61 exit $ERRORS{'OK'}; 60 exit $ERRORS{'OK'};
62} 61}
63 62
@@ -217,7 +216,7 @@ sub print_usage () {
217} 216}
218 217
219sub print_help () { 218sub print_help () {
220 print_revision($PROGNAME,'$Revision$'); 219 print_revision($PROGNAME,'@NP_VERSION@');
221 print "Copyright (c) 2000 Ernst-Dieter Martin/Karl DeBisschop 220 print "Copyright (c) 2000 Ernst-Dieter Martin/Karl DeBisschop
222 221
223Check available flexlm license managers 222Check available flexlm license managers
diff --git a/plugins-scripts/check_ifoperstatus.pl b/plugins-scripts/check_ifoperstatus.pl
index 75e852d..d0a1655 100644..100755
--- a/plugins-scripts/check_ifoperstatus.pl
+++ b/plugins-scripts/check_ifoperstatus.pl
@@ -25,7 +25,6 @@
25# Report bugs to: nagiosplug-help@lists.sourceforge.net 25# Report bugs to: nagiosplug-help@lists.sourceforge.net
26# 26#
27# 11.01.2000 Version 1.0 27# 11.01.2000 Version 1.0
28# $Id$
29# 28#
30# Patches from Guy Van Den Bergh to warn on ifadminstatus down interfaces 29# Patches from Guy Van Den Bergh to warn on ifadminstatus down interfaces
31# instead of critical. 30# instead of critical.
@@ -313,7 +312,7 @@ sub print_help() {
313 printf "intensive. Use it sparingly or not at all. -n is used to match against\n"; 312 printf "intensive. Use it sparingly or not at all. -n is used to match against\n";
314 printf "a much more descriptive ifName value in the IfXTable to verify that the\n"; 313 printf "a much more descriptive ifName value in the IfXTable to verify that the\n";
315 printf "snmpkey has not changed to some other network interface after a reboot.\n\n"; 314 printf "snmpkey has not changed to some other network interface after a reboot.\n\n";
316 print_revision($PROGNAME, '$Revision$'); 315 print_revision($PROGNAME, '@NP_VERSION@');
317 316
318} 317}
319 318
@@ -351,7 +350,7 @@ sub process_arguments() {
351 } 350 }
352 351
353 if ($opt_V) { 352 if ($opt_V) {
354 print_revision($PROGNAME,'$Revision$ '); 353 print_revision($PROGNAME,'@NP_VERSION@');
355 exit $ERRORS{'OK'}; 354 exit $ERRORS{'OK'};
356 } 355 }
357 356
diff --git a/plugins-scripts/check_ifstatus.pl b/plugins-scripts/check_ifstatus.pl
index 1a168bf..bae3ffa 100755
--- a/plugins-scripts/check_ifstatus.pl
+++ b/plugins-scripts/check_ifstatus.pl
@@ -29,7 +29,6 @@
29# 29#
30# 11.01.2000 Version 1.0 30# 11.01.2000 Version 1.0
31# 31#
32# $Id$
33 32
34use POSIX; 33use POSIX;
35use strict; 34use strict;
@@ -255,7 +254,7 @@ sub print_help (){
255 printf " -t (--timeout) seconds before the plugin times out (default=$TIMEOUT)\n"; 254 printf " -t (--timeout) seconds before the plugin times out (default=$TIMEOUT)\n";
256 printf " -V (--version) Plugin version\n"; 255 printf " -V (--version) Plugin version\n";
257 printf " -h (--help) usage help \n\n"; 256 printf " -h (--help) usage help \n\n";
258 print_revision($PROGNAME, '$Revision$'); 257 print_revision($PROGNAME, '@NP_VERSION@');
259 258
260} 259}
261 260
@@ -285,7 +284,7 @@ sub process_arguments() {
285 exit $ERRORS{'OK'}; 284 exit $ERRORS{'OK'};
286 } 285 }
287 if ($opt_V) { 286 if ($opt_V) {
288 print_revision($PROGNAME,'$Revision$ '); 287 print_revision($PROGNAME,'@NP_VERSION@');
289 exit $ERRORS{'OK'}; 288 exit $ERRORS{'OK'};
290 } 289 }
291 290
diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl
index 7a90a96..cc730cf 100755
--- a/plugins-scripts/check_ircd.pl
+++ b/plugins-scripts/check_ircd.pl
@@ -7,7 +7,6 @@
7# 7#
8# Date: 1999/09/20 8# Date: 1999/09/20
9# 9#
10# $Id$
11# 10#
12# Description: This script will check to see if an IRCD is running 11# Description: This script will check to see if an IRCD is running
13# about how many users it has 12# about how many users it has
@@ -119,7 +118,7 @@ sub print_usage () {
119 118
120sub print_help () 119sub print_help ()
121{ 120{
122 print_revision($PROGNAME,'$Revision$ '); 121 print_revision($PROGNAME,'@NP_VERSION@');
123 print "Copyright (c) 2000 Richard Mayhew/Karl DeBisschop 122 print "Copyright (c) 2000 Richard Mayhew/Karl DeBisschop
124 123
125Perl Check IRCD plugin for Nagios 124Perl Check IRCD plugin for Nagios
@@ -190,7 +189,7 @@ MAIN:
190 "H=s" => \$opt_H, "hostname=s" => \$opt_H); 189 "H=s" => \$opt_H, "hostname=s" => \$opt_H);
191 190
192 if ($opt_V) { 191 if ($opt_V) {
193 print_revision($PROGNAME,'$Revision$ '); 192 print_revision($PROGNAME,'@NP_VERSION@');
194 exit $ERRORS{'OK'}; 193 exit $ERRORS{'OK'};
195 } 194 }
196 195
diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh
index 6f6e68c..a1bfb48 100755
--- a/plugins-scripts/check_log.sh
+++ b/plugins-scripts/check_log.sh
@@ -71,7 +71,7 @@ TOUCH="/bin/touch"
71 71
72PROGNAME=`/bin/basename $0` 72PROGNAME=`/bin/basename $0`
73PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` 73PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
74REVISION=`echo '$Revision$' | sed -e 's/[^0-9.]//g'` 74REVISION="@NP_VERSION@"
75 75
76. $PROGPATH/utils.sh 76. $PROGPATH/utils.sh
77 77
diff --git a/plugins-scripts/check_mailq.pl b/plugins-scripts/check_mailq.pl
index c676e41..95ef2ce 100755
--- a/plugins-scripts/check_mailq.pl
+++ b/plugins-scripts/check_mailq.pl
@@ -22,7 +22,6 @@
22# along with this program; if not, write to the Free Software 22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24# 24#
25# $Id$
26# 25#
27############################################################################ 26############################################################################
28 27
@@ -522,7 +521,7 @@ sub process_arguments(){
522 ); 521 );
523 522
524 if ($opt_V) { 523 if ($opt_V) {
525 print_revision($PROGNAME,'$Revision$ '); 524 print_revision($PROGNAME,'@NP_VERSION@');
526 exit $ERRORS{'OK'}; 525 exit $ERRORS{'OK'};
527 } 526 }
528 527
@@ -580,7 +579,7 @@ sub print_usage () {
580} 579}
581 580
582sub print_help () { 581sub print_help () {
583 print_revision($PROGNAME,'$Revision$'); 582 print_revision($PROGNAME,'@NP_VERSION@');
584 print "Copyright (c) 2002 Subhendu Ghosh/Carlos Canau/Benjamin Schmid\n"; 583 print "Copyright (c) 2002 Subhendu Ghosh/Carlos Canau/Benjamin Schmid\n";
585 print "\n"; 584 print "\n";
586 print_usage(); 585 print_usage();
diff --git a/plugins-scripts/check_mssql.pl b/plugins-scripts/check_mssql.pl
index fa15476..9a8fc51 100755
--- a/plugins-scripts/check_mssql.pl
+++ b/plugins-scripts/check_mssql.pl
@@ -23,7 +23,6 @@
23# 23#
24# Report bugs to: nagiosplug-help@lists.sourceforge.net 24# Report bugs to: nagiosplug-help@lists.sourceforge.net
25# 25#
26# $Id$
27# 26#
28 27
29 28
@@ -125,7 +124,7 @@ sub process_arguments {
125 "V" => \$opt_V, "version" => \$opt_V); 124 "V" => \$opt_V, "version" => \$opt_V);
126 125
127 if (defined $opt_V) { 126 if (defined $opt_V) {
128 print_revision($PROGNAME,'$Revision$'); 127 print_revision($PROGNAME,'@NP_VERSION@');
129 exit $ERRORS{'OK'}; 128 exit $ERRORS{'OK'};
130 } 129 }
131 130
diff --git a/plugins-scripts/check_netdns.pl b/plugins-scripts/check_netdns.pl
index 6872b93..ecdbdb1 100755
--- a/plugins-scripts/check_netdns.pl
+++ b/plugins-scripts/check_netdns.pl
@@ -5,7 +5,6 @@
5# 5#
6# Copyright 2000, virCIO, LLP 6# Copyright 2000, virCIO, LLP
7# 7#
8# $Log$
9# Revision 1.3 2002/05/07 05:35:49 sghosh 8# Revision 1.3 2002/05/07 05:35:49 sghosh
10# 2nd fix for ePN 9# 2nd fix for ePN
11# 10#
diff --git a/plugins-scripts/check_ntp.pl b/plugins-scripts/check_ntp.pl
index d4175f6..5c87e0a 100755
--- a/plugins-scripts/check_ntp.pl
+++ b/plugins-scripts/check_ntp.pl
@@ -7,7 +7,6 @@
7# be installed on the system, however since it's part of the ntp suite, you 7# be installed on the system, however since it's part of the ntp suite, you
8# should already have it installed. 8# should already have it installed.
9# 9#
10# $Id$
11# 10#
12# Nothing clever done in this program - its a very simple bare basics hack to 11# Nothing clever done in this program - its a very simple bare basics hack to
13# get the job done. 12# get the job done.
@@ -97,7 +96,7 @@ GetOptions
97 "H=s" => \$opt_H, "hostname=s" => \$opt_H); 96 "H=s" => \$opt_H, "hostname=s" => \$opt_H);
98 97
99if ($opt_V) { 98if ($opt_V) {
100 print_revision($PROGNAME,'$Revision$ '); 99 print_revision($PROGNAME,'@NP_VERSION@');
101 exit $ERRORS{'OK'}; 100 exit $ERRORS{'OK'};
102} 101}
103 102
@@ -443,7 +442,7 @@ sub print_usage () {
443} 442}
444 443
445sub print_help () { 444sub print_help () {
446 print_revision($PROGNAME,'$Revision$'); 445 print_revision($PROGNAME,'@NP_VERSION@');
447 print "Copyright (c) 2003 Bo Kersey/Karl DeBisschop\n"; 446 print "Copyright (c) 2003 Bo Kersey/Karl DeBisschop\n";
448 print "\n"; 447 print "\n";
449 print_usage(); 448 print_usage();
diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh
index 0a8f152..664795e 100755
--- a/plugins-scripts/check_oracle.sh
+++ b/plugins-scripts/check_oracle.sh
@@ -8,7 +8,7 @@
8 8
9PROGNAME=`basename $0` 9PROGNAME=`basename $0`
10PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` 10PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
11REVISION=`echo '$Revision$' | sed -e 's/[^0-9.]//g'` 11REVISION="@NP_VERSION@"
12 12
13. $PROGPATH/utils.sh 13. $PROGPATH/utils.sh
14 14
diff --git a/plugins-scripts/check_rpc.pl b/plugins-scripts/check_rpc.pl
index 20c204d..d2701e9 100755
--- a/plugins-scripts/check_rpc.pl
+++ b/plugins-scripts/check_rpc.pl
@@ -15,10 +15,8 @@
15# 15#
16# initial version: 3 May 2000 by Truongchinh Nguyen and Karl DeBisschop 16# initial version: 3 May 2000 by Truongchinh Nguyen and Karl DeBisschop
17# Modified May 2002 Subhendu Ghosh - support for ePN and patches 17# Modified May 2002 Subhendu Ghosh - support for ePN and patches
18# current status: $Revision$
19# 18#
20# Copyright Notice: GPL 19# Copyright Notice: GPL
21# $Id$
22# 20#
23 21
24use strict; 22use strict;
@@ -38,13 +36,13 @@ sub print_help ();
38sub print_usage (); 36sub print_usage ();
39sub in ($$); 37sub in ($$);
40 38
41$ENV{'BASH_ENV'}=''; 39$ENV{'BASH_ENV'}='';
42$ENV{'ENV'}=''; 40$ENV{'ENV'}='';
43$ENV{'PATH'}=''; 41$ENV{'PATH'}='';
44$ENV{'LC_ALL'}='C'; 42$ENV{'LC_ALL'}='C';
45 43
46#Initialise protocol for each progname number 44#Initialise protocol for each progname number
47# 'u' for UDP, 't' for TCP 45# 'u' for UDP, 't' for TCP
48$proto[10003]='u'; 46$proto[10003]='u';
49$proto[10004]='u'; 47$proto[10004]='u';
50$proto[10007]='u'; 48$proto[10007]='u';
@@ -67,9 +65,9 @@ GetOptions(
67if ($opt_h) { print_help(); exit $ERRORS{'OK'}; } 65if ($opt_h) { print_help(); exit $ERRORS{'OK'}; }
68 66
69# -V means display version number 67# -V means display version number
70if ($opt_V) { 68if ($opt_V) {
71 print_revision($PROGNAME,'$Revision$ '); 69 print_revision($PROGNAME,'@NP_VERSION@');
72 exit $ERRORS{'OK'}; 70 exit $ERRORS{'OK'};
73} 71}
74 72
75# Hash containing all RPC program names and numbers 73# Hash containing all RPC program names and numbers
@@ -275,7 +273,7 @@ if (defined $opt_c ) {
275 }else{ 273 }else{
276 print "Version $vers is not an integer\n" if $verbose; 274 print "Version $vers is not an integer\n" if $verbose;
277 } 275 }
278 276
279 } 277 }
280}else{ 278}else{
281 get_rpcinfo(); 279 get_rpcinfo();
@@ -311,7 +309,7 @@ sub get_rpcinfo {
311 while ( $line = <CMD> ) { 309 while ( $line = <CMD> ) {
312 printf "$line " if $verbose; 310 printf "$line " if $verbose;
313 chomp $line; 311 chomp $line;
314 312
315 if ( $line =~ /program $prognum version ([0-9]*) ready and waiting/ ) { 313 if ( $line =~ /program $prognum version ([0-9]*) ready and waiting/ ) {
316 $response .= " version $1"; 314 $response .= " version $1";
317 $state = 'OK' unless $state ne 'UNKNOWN'; 315 $state = 'OK' unless $state ne 'UNKNOWN';
@@ -336,7 +334,7 @@ sub get_rpcinfo {
336 334
337 335
338sub print_help() { 336sub print_help() {
339 print_revision($PROGNAME,'$Revision$ '); 337 print_revision($PROGNAME,'@NP_VERSION@');
340 print "Copyright (c) 2002 Karl DeBisschop/Truongchinh Nguyen/Subhendu Ghosh\n"; 338 print "Copyright (c) 2002 Karl DeBisschop/Truongchinh Nguyen/Subhendu Ghosh\n";
341 print "\n"; 339 print "\n";
342 print "Check if a rpc service is registered and running using\n"; 340 print "Check if a rpc service is registered and running using\n";
diff --git a/plugins-scripts/check_sensors.sh b/plugins-scripts/check_sensors.sh
index 7e1d333..ae80fc4 100755
--- a/plugins-scripts/check_sensors.sh
+++ b/plugins-scripts/check_sensors.sh
@@ -4,7 +4,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
4 4
5PROGNAME=`basename $0` 5PROGNAME=`basename $0`
6PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` 6PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
7REVISION=`echo '$Revision$' | sed -e 's/[^0-9.]//g'` 7REVISION="@NP_VERSION@"
8 8
9. $PROGPATH/utils.sh 9. $PROGPATH/utils.sh
10 10
diff --git a/plugins-scripts/check_wave.pl b/plugins-scripts/check_wave.pl
index fe21701..2671112 100755
--- a/plugins-scripts/check_wave.pl
+++ b/plugins-scripts/check_wave.pl
@@ -1,6 +1,5 @@
1#!/usr/bin/perl -wT 1#!/usr/bin/perl -wT
2# 2#
3# $Id$
4 3
5 4
6use strict; 5use strict;
@@ -30,7 +29,7 @@ GetOptions
30 "H=s" => \$opt_H, "hostname=s" => \$opt_H); 29 "H=s" => \$opt_H, "hostname=s" => \$opt_H);
31 30
32if ($opt_V) { 31if ($opt_V) {
33 print_revision($PROGNAME,'$Revision$'); #' 32 print_revision($PROGNAME,'@NP_VERSION@'); #'
34 exit $ERRORS{'OK'}; 33 exit $ERRORS{'OK'};
35} 34}
36 35
@@ -112,7 +111,7 @@ sub print_usage () {
112} 111}
113 112
114sub print_help () { 113sub print_help () {
115 print_revision($PROGNAME,'$Revision$'); 114 print_revision($PROGNAME,'@NP_VERSION@');
116 print "Copyright (c) 2000 Jeffery Blank/Karl DeBisschop\n"; 115 print "Copyright (c) 2000 Jeffery Blank/Karl DeBisschop\n";
117 print "\n"; 116 print "\n";
118 print_usage(); 117 print_usage();
diff --git a/plugins-scripts/subst.in b/plugins-scripts/subst.in
index 8986868..80b93d9 100644
--- a/plugins-scripts/subst.in
+++ b/plugins-scripts/subst.in
@@ -37,6 +37,9 @@ BEGIN {
37 37
38} 38}
39 39
40# Plugin revision
41/@NP_VERSION@/ {sub(/@NP_VERSION@/,ENVIRON["NP_VERSION"]);}
42
40# scripting language (first line) 43# scripting language (first line)
41 44
42/^#! ?\/.*\/python/ {sub(/^#! ?\/.*\/python/,"#! @PYTHON@");} 45/^#! ?\/.*\/python/ {sub(/^#! ?\/.*\/python/,"#! @PYTHON@");}
diff --git a/plugins-scripts/t/check_file_age.t b/plugins-scripts/t/check_file_age.t
index 372b9f2..384c276 100644
--- a/plugins-scripts/t/check_file_age.t
+++ b/plugins-scripts/t/check_file_age.t
@@ -2,7 +2,6 @@
2# 2#
3# check_file_age tests 3# check_file_age tests
4# 4#
5# $Id$
6# 5#
7 6
8use strict; 7use strict;
diff --git a/plugins-scripts/t/check_rpc.t b/plugins-scripts/t/check_rpc.t
index 9fff0ee..be8ae2f 100644
--- a/plugins-scripts/t/check_rpc.t
+++ b/plugins-scripts/t/check_rpc.t
@@ -2,7 +2,6 @@
2# 2#
3# Remote Procedure Call (RPC) Tests via check_rpc 3# Remote Procedure Call (RPC) Tests via check_rpc
4# 4#
5# $Id$
6# 5#
7 6
8use strict; 7use strict;
diff --git a/plugins-scripts/t/utils.t b/plugins-scripts/t/utils.t
index f37f567..9c2c569 100644
--- a/plugins-scripts/t/utils.t
+++ b/plugins-scripts/t/utils.t
@@ -2,7 +2,6 @@
2# 2#
3# utils.pm tests 3# utils.pm tests
4# 4#
5# $Id$
6# 5#
7# Run with perl t/utils.t 6# Run with perl t/utils.t
8 7
diff --git a/plugins-scripts/utils.pm.in b/plugins-scripts/utils.pm.in
index 08776f1..37cd62c 100644
--- a/plugins-scripts/utils.pm.in
+++ b/plugins-scripts/utils.pm.in
@@ -1,5 +1,4 @@
1# Utility drawer for Nagios plugins. 1# Utility drawer for Nagios plugins.
2# $Id$
3# 2#
4# This will be deprecated soon. Please use Nagios::Plugin from CPAN 3# This will be deprecated soon. Please use Nagios::Plugin from CPAN
5# for new plugins 4# for new plugins
@@ -32,8 +31,6 @@ $TIMEOUT = 15;
32sub print_revision ($$) { 31sub print_revision ($$) {
33 my $commandName = shift; 32 my $commandName = shift;
34 my $pluginRevision = shift; 33 my $pluginRevision = shift;
35 $pluginRevision =~ s/^\$Revision: //;
36 $pluginRevision =~ s/ \$\s*$//;
37 print "$commandName v$pluginRevision (@PACKAGE@ @VERSION@)\n"; 34 print "$commandName v$pluginRevision (@PACKAGE@ @VERSION@)\n";
38 print "@WARRANTY@"; 35 print "@WARRANTY@";
39} 36}