New upstream version 2.0.0

This commit is contained in:
Jan Wagner 2016-12-04 11:31:25 +01:00
parent 1eca1c0377
commit 9c06100871
71 changed files with 20366 additions and 9590 deletions

View file

@ -0,0 +1,38 @@
--- p1.pl.dist 2006-03-21 11:42:30.000000000 +1100
+++ p1.pl 2006-03-21 11:56:16.000000000 +1100
@@ -69,27 +69,29 @@
sub TIEHANDLE {
my ($class) = @_;
- my $me ;
+ my $me = '';
bless \$me, $class;
}
sub PRINT {
my $self = shift;
- $$self = substr(join('',@_), 0, 256) ;
- # $$self .= substr(join('',@_), 0, 256) ;
+ # $$self = substr(join('',@_), 0, 256) ;
+ $$self .= substr(join('',@_), 0, 256) ;
}
sub PRINTF {
my $self = shift;
my $fmt = shift;
- $$self = substr(sprintf($fmt,@_), 0, 256) ;
- # $$self .= substr(sprintf($fmt,@_), 0, 256) ;
+ # $$self = substr(sprintf($fmt,@_), 0, 256) ;
+ $$self .= substr(sprintf($fmt,@_), 0, 256) ;
}
sub READLINE {
my $self = shift;
+ # Omit all lines after the first, per the nagios plugin guidelines
+ $$self = (split /\n/, $$self)[0];
# Perl code other than plugins may print nothing; in this case return "(No output!)\n".
- return $$self ? $$self : "(No output!)\n" ;
+ return $$self ? substr($$self, 0, 256) : "(No output!)\n" ;
}
sub CLOSE {