Changeset 3420

Show
Ignore:
Timestamp:
15/03/10 22:58:10 (2 years ago)
Author:
feiner.tom
Message:

Fix sensors plugin parsing of Voltage, which needs to allow for whitespace at the begnining of the line. Debian bug: http://bugs.debian.org/573613. Thanks to Arthur Liu for the patch!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tags/1.4.4/plugins/node.d.linux/sensors_.in

    r3419 r3420  
    162162    volt => { 
    163163        regex => qr/ 
    164             ^ # String must start with: 
     164            ^           # String must start with: 
     165            (\s?\S[^:]*)# Match any non-whitespace char, except ':' 
     166                        # but allow an optional whitespace at the begining. 
     167                        # This is needed as voltages are sometimes printed with 
     168                        # one space in front of them. 
     169                        # (match the label as \$1) 
    165170            (\S[^:]*)   # Match any non-whitespace char, except ':'  
    166171                        # (match the label as \$1) 
     
    273278sub fan_threshold { 
    274279  my $name = shift; 
    275   my $max = shift; 
    276280  my $min = shift; 
    277281