Changeset 3345

Show
Ignore:
Timestamp:
09/02/10 13:45:00 (6 months ago)
Author:
janl
Message:

* munin-update: Fix config line continuation hadling

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/master/lib/Munin/Master/Config.pm

    r3052 r3345  
    484484        $self->_trim($line); 
    485485 
    486         if ( !length($line) ) { 
    487             next; 
    488         } 
    489  
    490486        # Handle continuation lines (ending in \) 
    491487        if ($line =~ s|\\$||) { 
     
    493489            next; 
    494490        } elsif ($continuation) { 
    495             $line = $continuation
     491            $line = $continuation . $line
    496492            $continuation = ''; 
    497493        } 
    498          
     494 
     495        # This must be handled after continuation hadling otherwise 
     496        # empty lines will be ignored in continuation context. 
     497        next if !length($line); 
     498 
    499499        # Group/host/service configuration is saved for later persual. 
    500500        # Everything else is saved at once.  Note that _trim removes