Code

Added option to invert search results
[nagiosplug.git] / plugins-scripts / check_wave.pl
index c6e6c6620e42538dcbaddc6bc8bda95f33b464f6..2671112a0d392c24ffbc698741757ae46352c329 100755 (executable)
@@ -1,17 +1,9 @@
-#! /usr/bin/perl -wT
+#!/usr/bin/perl -wT
 #
-# $Id$
 
 
-BEGIN {
-       if ($0 =~ m/^(.*?)[\/\\]([^\/\\]+)$/) {
-               $runtimedir = $1;
-               $PROGNAME = $2;
-       }
-}
-
 use strict;
-use lib $main::runtimedir;
+use lib utils.pm;
 use utils qw($TIMEOUT %ERRORS &print_revision &support);
 use vars qw($PROGNAME);
 use Getopt::Long;
@@ -19,6 +11,7 @@ use vars qw($opt_V $opt_h $verbose $opt_w $opt_c $opt_H);
 my (@test, $low1, $med1, $high1, $snr, $low2, $med2, $high2);
 my ($low, $med, $high, $lowavg, $medavg, $highavg, $tot, $ss);
 
+$PROGNAME = "check_wave";
 sub print_help ();
 sub print_usage ();
 
@@ -36,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'};
 }
 
@@ -118,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();