# HG changeset patch # User arnold # Date 1343898224 -7200 # Node ID 5f67fdc48747ba7d39e7740fe96ecbfb466bb402 # Parent 2fde8823787b7a5cdfa83a6c24d05ea838cd6ad3 now it should work with older perl versions diff -r 2fde8823787b -r 5f67fdc48747 check_hddtemp.pl --- a/check_hddtemp.pl Thu Aug 02 10:48:39 2012 +0200 +++ b/check_hddtemp.pl Thu Aug 02 11:03:44 2012 +0200 @@ -17,7 +17,6 @@ # # Christian Arnold -use 5.010; use strict; use File::Basename; use Getopt::Long; @@ -40,7 +39,7 @@ my $ME = basename $0; my $NAME = "HDDTEMP"; -my $VERSION = "1.5"; +my $VERSION = "1.6"; my ( @devices, @output ); @@ -72,7 +71,7 @@ my %temp; if ( !-x $binary ) { - say "$NAME CRITICAL: $binary - not found or not executable"; + print "$NAME CRITICAL: $binary - not found or not executable\n"; exit $ERRORS{CRITICAL}; } @@ -80,8 +79,8 @@ foreach my $dev (@devices) { if ( !-r $dev ) { - say -"$NAME CRITICAL: $dev - not exists or not read permission is granted"; + print +"$NAME CRITICAL: $dev - not exists or not read permission is granted\n"; exit $ERRORS{CRITICAL}; } my @line = grep { /^$dev/ } `$binary $dev`; @@ -124,26 +123,26 @@ } if ($crit) { - say "$NAME CRITICAL: " + print "$NAME CRITICAL: " . join( ' ', @output ) . " | " - . join( ' ', @perf ); + . join( ' ', @perf ) . "\n"; exit $ERRORS{CRITICAL}; } elsif ($warn) { - say "$NAME WARNING: " + print "$NAME WARNING: " . join( ' ', @output ) . " | " - . join( ' ', @perf ); + . join( ' ', @perf ) . "\n"; exit $ERRORS{WARNING}; } - say "$NAME OK: " . join( ' ', @output ) . " | " . join( ' ', @perf ); + print "$NAME OK: " . join( ' ', @output ) . " | " . join( ' ', @perf ) . "\n"; exit $ERRORS{OK}; } sub version($$) { my ( $progname, $version ) = @_; - say <<_VERSION; + print <<_VERSION; $progname version $version Copyright (C) 2012 by Christian Arnold and Schlittermann internet & unix support. @@ -209,7 +208,7 @@ =head1 VERSION -This man page is current for version 1.5 of B. +This man page is current for version 1.6 of B. =head1 AUTHOR diff -r 2fde8823787b -r 5f67fdc48747 debian/changelog --- a/debian/changelog Thu Aug 02 10:48:39 2012 +0200 +++ b/debian/changelog Thu Aug 02 11:03:44 2012 +0200 @@ -1,3 +1,9 @@ +nagios-plugin-hddtemp (1.6) stable; urgency=low + + * now it should work with older perl versions + + -- Christian Arnold Thu, 02 Aug 2012 10:58:52 +0200 + nagios-plugin-hddtemp (1.5) stable; urgency=low * change version string to 1.5