Mailing List Archive

patch adding option for testing configuration
Hello,

I've attached a patch to this message adding a config option (-T) to run
rsyslog with configuration testing, immediatly exiting with 0 if the
conf is valid. For us this is an important feature to make sure a
configuration is valid before starting the daemon.

The style of the patch is probably not acceptable for inclusion, but it
does it's job, so maybe a variant of it can be included.

Regards,

Klas Lindfors
Stockholm University
patch adding option for testing configuration [ In reply to ]
Hi Klas,

the patch did not make it to the mailing list (the list processor is
very picky to prevent spreading spam and malware). However, from you
description it sounds like the -N option which has recently (3.21.1)
been introduced. Please see

http://www.rsyslog.com/doc-troubleshoot.html

under "configuration problems". I don't know out of my head if the exit
code works in the way you describe, but that should be an easy add. I
suggest you file an enhancement request if in doubt
(http://bugzilla.adiscon.com). I'll be soon away for summer break, so
that needs to wait until after it ;)

Please let me know if -N goes into the right direction.

Thanks,
Rainer

> -----Original Message-----
> From: rsyslog-bounces at lists.adiscon.com [mailto:rsyslog-
> bounces at lists.adiscon.com] On Behalf Of Klas Lindfors
> Sent: Friday, August 15, 2008 9:37 AM
> To: rsyslog at lists.adiscon.com
> Subject: [rsyslog] patch adding option for testing configuration
>
> Hello,
>
> I've attached a patch to this message adding a config option (-T) to
> run
> rsyslog with configuration testing, immediatly exiting with 0 if the
> conf is valid. For us this is an important feature to make sure a
> configuration is valid before starting the daemon.
>
> The style of the patch is probably not acceptable for inclusion, but
it
> does it's job, so maybe a variant of it can be included.
>
> Regards,
>
> Klas Lindfors
> Stockholm University