[BACK]Return to check_bioctl CVS log [TXT][DIR] Up to [local] / nagios / check_bioctl

Diff for /nagios/check_bioctl/check_bioctl between version 1.8 and 1.9

version 1.8, 2009/11/09 18:11:33 version 1.9, 2009/11/09 20:22:43
Line 1 
Line 1 
 #!/usr/bin/perl -T  #!/usr/bin/perl -T
 # $RedRiver: check_bioctl,v 1.7 2009/11/09 18:00:09 andrew Exp $  # $RedRiver: check_bioctl,v 1.8 2009/11/09 18:11:33 andrew Exp $
 ########################################################################  ########################################################################
 # check_bioctl *** A nagios check for OpenBSD bioctl  # check_bioctl *** A nagios check for OpenBSD bioctl
 #  #
 # 2006.07.26 #*#*# andrew fresh <andrew@mad-techies.org>  # 2006.07.26 #*#*# andrew fresh <andrew@afresh1.com>
 ########################################################################  ########################################################################
 use strict;  use strict;
 use warnings;  use warnings;
Line 12 
Line 12 
   
 use constant NAGIOS_OUTPUT => 1;  use constant NAGIOS_OUTPUT => 1;
   
   my $License = <<'EOL';
   Copyright (c) 2009 Andrew Fresh <andrew@afresh1.com>
   Permission to use, copy, modify, and distribute this software for any
   purpose with or without fee is hereby granted, provided that the above
   copyright notice and this permission notice appear in all copies.
   
   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
   WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
   MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
   ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   EOL
   
 use POSIX;  use POSIX;
 use lib "/usr/local/libexec/nagios";  use lib "/usr/local/libexec/nagios";
 use utils qw($TIMEOUT %ERRORS &print_revision &support);  use utils qw($TIMEOUT %ERRORS &support);
   
 use Getopt::Long;  use Getopt::Long;
 Getopt::Long::Configure('bundling');  Getopt::Long::Configure('bundling');
Line 163 
Line 178 
 exit $ERRORS{$state};  exit $ERRORS{$state};
   
 sub print_help {  sub print_help {
     print <<EOL;      print <<"EOL";
 $PROGNAME plugin for Nagios monitors bioctl on OpenBSD  $PROGNAME plugin for Nagios monitors bioctl on OpenBSD
     $PROGNAME -d <device> [ -d <device2> [ -d ... ] ]      $PROGNAME -d <device> [ -d <device2> [ -d ... ] ]
   
Line 176 
Line 191 
 EOL  EOL
   
     print_revision( $PROGNAME, '$Revision$' );      print_revision( $PROGNAME, '$Revision$' );
   
       print $License;
 }  }
   
   
   sub print_revision {
       my ($prog, $rev) = @_;
       $rev =~ s/^\D+([\d\.]+)\D+$/v$1/xms;
   
       print "$prog $rev\n";
   }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>