Line continuations not working as expected

Matthew Richardson matthew-ln at itconsult.co.uk
Fri Feb 1 19:49:40 CET 2008


>From: Ethan Galstad <nagios at nagios.org>
>To: Nagios Developers List <nagios-devel at lists.sourceforge.net>
>Cc: 
>Date: Thu, 24 Jan 2008 06:19:45 -0600
>Subject: Re: [Nagios-devel] Line continuations not working as expected

>Matthew Richardson wrote:
>> Sorry folks, I thought I had checked this before sending the message, but
>> had done it wrong.
>> 
>> The issue is the difference between Unix & Windows line ends in the config
>> files.
>> 
>> Using a "\" to end a line terminated with Unix line end, Nagios correctly
>> treats the subsequent line as a continuation.
>> 
>> Unfortunately if a Windows line end (CRLF) follows the "\", Nagios does not
>> treat the line as a continuation.
>> 
>> Because of the way I use a Windows PC, almost all of my Nagios config files
>> have Windows not Unix line ends.  Apart from this issue, I have had no
>> problems.
>> 
>> Would it be possible to adjust the code so as to allow continuations with
>> either type of line end?
>> 
>> Best wishes,
>> Matthew
>[snip]
>
>Thanks for the note Matthew - a patch will be in CVS momentarily to
>handle the CR/LF scenario...

I fear that you have made this worse in 3.0rc2 - indeed I think you may
have broken it completely...  :-(

I have just upgraded a box with a working config from 3.0rc1 to 3.0rc2 and
the service refused to start with a configuration fault.  The fault
occurred where I had configs with "\" over multiple lines.

The particular file had Unix line ends.  I have tried with Windows line
ends, and it still did not work.

Obviously making one long line fixed the problem, but is not very
readable...

Best wishes,
Matthew

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/




More information about the Developers mailing list