diff -ruN nagiosplug-save/contrib/check_lmmon.pl nagiosplug/contrib/check_lmmon.pl
--- nagiosplug-save/contrib/check_lmmon.pl	2002-06-25 14:55:07.000000000 +0100
+++ nagiosplug/contrib/check_lmmon.pl	2004-03-27 22:23:39.000000000 +0000
@@ -1,19 +1,68 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -wT
 # NetSaint Temp warning script
 # Written by: Nathan LeSueur
 
-if ($#ARGV < 1) {
-print "Usage: $0 <critical temp> <warning temp> <normal temp>\n";
-exit; } $crit = shift; $warn = shift; $norm = shift; if ($warn >
-$crit) {    print "Warning level cannot be greater than critical
-level!\n"; exit; } @b = qx{/usr/local/bin/lmmon -s}; foreach(@b) { @c
-= split(/ \/ /, $_); $d = $c[1]; } @e = split(/F/, $d); $f = $e[0];
-
-$status = "$f degrees F\n";
-
-if($f >= $crit) {print "CRITICAL - $status"; exit 2;}
-if($f >= $warn) {print "WARNING - $status"; exit 1;}
-if($f <= $norm && $f != 0) {print "OK - $status"; exit 0;}
-else{print "UNKNOWN - unable to access smb\n"; exit (-1);}
+require 5.004;
+use strict;
+use lib utils.pm ;
+use Plugin;
+use Plugin::Parameter qw(:DEFAULT :thresholds);
+
+use vars qw($opt_c $opt_w $opt_n $opt_t $PROGNAME);
+
+use utils qw(%ERRORS);
+
+$c_opt->type("TEMPERATURE");
+$c_opt->description("Critical operating temperature for motherboard");
+$w_opt->type("TEMPERATURE");
+$w_opt->description("Warning operating temperature for motherboard");
+my $n_opt = new Plugin::Parameter(-name => "normaltemp", -flags => [ 'n', 'normal' ],
+				  -optional => "no", -valueoptional => "no", -type => "TEMPERATURE",
+				  -description => "Normal operating temperature for motherboard");
+my $plugin = new Plugin(-revision => '$Revision: 1.1 $',
+			-copyright => "Nathan LeSueur, 2004 Howard Wilkinson <howard\@cohtech.com>",
+			-shortcomment => "read the motherboard data",
+			-parameterlists => [ [ $c_opt, $w_opt, $n_opt, $t_opt ], $h_opts, $V_opts ]);
+
+$plugin->init();
+
+if ($opt_w > $opt_c) {
+  print "Warning level cannot be greater than critical level!\n";
+  exit;
+}
+
+$plugin->start_timeout($opt_t, "Timed out trying to read mothboard data");
+
+my @b = qx{/usr/local/bin/lmmon -s};
+
+$plugin->stop_timeout();
+
+my $d = undef;
+
+foreach(@b) {
+  my @c = split(/ \/ /, $_);
+  $d = $c[1];
+}
+
+my @e = split(/F/, $d);
+my $f = $e[0];
+
+my $status = "$f degrees F\n";
+
+if($f >= $opt_c) {
+  print "$PROGNAME CRITICAL: $status\n";
+  exit $ERRORS{'CRITICAL'};
+}
+if($f >= $opt_w) {
+  print "$PROGNAME WARNING: $status\n";
+  exit $ERRORS{'WARNING'};
+}
+if($f <= $opt_n && $f != 0) {
+  print "$PROGNAME OK: - $status\n";
+  exit $ERRORS{'OK'};
+} else {
+  print "$PROGNAME UNKNOWN: unable to access smb\n";
+  exit $ERRORS{'UNKNOWN'};
+}
 
 
