[Resmon-devel] [resmon commit] r205 - trunk/lib/Resmon/Module

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Tue Aug 18 14:12:14 EDT 2009


Author: seriv
Date: 2009-08-18 14:12:12 -0400 (Tue, 18 Aug 2009)
New Revision: 205

Modified:
   trunk/lib/Resmon/Module/LINUX_CHECK_TEMP.pm
Log:
spaces in sensor names easier to change in configs than to escape in many places

Modified: trunk/lib/Resmon/Module/LINUX_CHECK_TEMP.pm
===================================================================
--- trunk/lib/Resmon/Module/LINUX_CHECK_TEMP.pm	2009-08-18 16:01:45 UTC (rev 204)
+++ trunk/lib/Resmon/Module/LINUX_CHECK_TEMP.pm	2009-08-18 18:12:12 UTC (rev 205)
@@ -11,12 +11,13 @@
 sub handler {
   my $arg = shift; 
   my ($sensor,$chip)=split('@', $arg->{'object'});
-  ## print STDERR "sensor=$sensor; chip=$chip\n" if $DEBUG>1;
+  print STDERR "sensor=$sensor; chip=$chip\n" if $DEBUG;
+  $sensor =~s/\+/ /g;
   my $warning = $arg->{'warning'};
   my $critical = $arg->{'critical'};
   $warning = $critical if not $warning;
   my $output = cache_command("/usr/bin/sensors $chip", 30);
-  ## print STDERR $output if $DEBUG>1;
+  print STDERR $output if $DEBUG;
   my @lines = split(/\n/, $output);
   my ($temp,$continues);
   for my $line (@lines) {



More information about the Resmon-devel mailing list