requirement for @version directive in 3.x config file
Our syslog-ng configuration file is generated automatically, from various different bits and pieces based on what roles and services a system provides. Unfortunately, our current implementation would not allow always ensuring that the "@version" directive is the first line in the generated config file. Version 3 of syslog-ng seems very unhappy if that is not the case. This seems somewhat inflexible, would it be possible to have a command line option specifying the configuration file version so it does not have to be on the very first line of the actual file? Any other suggestions (short of modifying our internal processes :) ) to get verison 3 to be happy with a configuration file without this specific directive as the very first line? Thanks much... -- Paul B. Henson | (909) 979-6361 | http://www.csupomona.edu/~henson/ Operating Systems and Network Analyst | henson@csupomona.edu California State Polytechnic University | Pomona CA 91768
Replying to myself for the sake of the archives. I realized I can use the syslog-ng include functionality to solve my problem; the main config file can just be the @version directive and an include directive to read our real config file renamed to something else. Sorry for the bother... On Mon, 4 Jan 2010, Paul B. Henson wrote:
Our syslog-ng configuration file is generated automatically, from various different bits and pieces based on what roles and services a system provides.
Unfortunately, our current implementation would not allow always ensuring that the "@version" directive is the first line in the generated config file. Version 3 of syslog-ng seems very unhappy if that is not the case. This seems somewhat inflexible, would it be possible to have a command line option specifying the configuration file version so it does not have to be on the very first line of the actual file? Any other suggestions (short of modifying our internal processes :) ) to get verison 3 to be happy with a configuration file without this specific directive as the very first line?
-- Paul B. Henson | (909) 979-6361 | http://www.csupomona.edu/~henson/ Operating Systems and Network Analyst | henson@csupomona.edu California State Polytechnic University | Pomona CA 91768
Le 05/01/2010 07:53, Paul B. Henson a écrit :
Replying to myself for the sake of the archives.
I realized I can use the syslog-ng include functionality to solve my problem; the main config file can just be the @version directive and an include directive to read our real config file renamed to something else.
Sorry for the bother...
However, I'm joining the complaint here: the parser should be able to ignore comments when determining what is the first line of the configuration file. Our syslog-ng configuration file is the only one that can't start with a SVN revision number for this reason :) -- BOFH excuse #371: Incorrectly configured static routes on the corerouters.
On Wed, 2010-01-06 at 10:02 +0100, Guillaume Rousse wrote:
Le 05/01/2010 07:53, Paul B. Henson a écrit :
Replying to myself for the sake of the archives.
I realized I can use the syslog-ng include functionality to solve my problem; the main config file can just be the @version directive and an include directive to read our real config file renamed to something else.
Sorry for the bother...
However, I'm joining the complaint here: the parser should be able to ignore comments when determining what is the first line of the configuration file. Our syslog-ng configuration file is the only one that can't start with a SVN revision number for this reason :)
Thanks for reporting this, it is indeed a annoying fact, thus I've just commited/pushed this patch to syslog-ng OSE 3.1. It will eventually be backported to the 3.0 branch as well, but I guess it will apply cleanly to 3.0 if you are in a rush. commit e719988e0e0716f2366b8d4faa340bbf42aacf3a Author: Balazs Scheidler <bazsi@balabit.hu> Date: Thu Jan 14 09:59:03 2010 +0100 config parser: accept comments/empty lines before the version mark This patch implements functionality to accept empty lines and lines beginning with a '#' before the "@version" mark. Reported-By: Paul B. Hanson & Guillaume Rousse -- Bazsi
participants (3)
-
Balazs Scheidler
-
Guillaume Rousse
-
Paul B. Henson