Re: #include?

From: Krzysztof Oledzki <ole#ans.pl>
Date: Fri, 30 May 2008 00:13:21 +0200 (CEST)

On Thu, 29 May 2008, Alberto Giménez wrote:

> On Thu, May 29, 2008 at 10:37 PM, Dan Zubey <dzubey#odysseyware.com> wrote:
>> Willy, would it be possible to add the directive 'include' to have the
>> pre-processor include another config file from the local filesystem?
>> i.e.,
>>
>> option include /etc/haproxy/backend.conf
>>
>>
>> It would help immensely to make things more readable for my coworkers :)
>>
>> I know I could write a pre-preprocessor to make a config file, just
>> wondering if we could have it in haproxy.
>
> Hi Dan, if you *really* need the include thing, you can use cpp and
> #include "files". That should work and you will not need to invent
> your own wheel ;)
>
> Another approach could be write a wrapper for haproxy initscript (or
> executable, directly) that "cat"s the config parts or so, but I think
> "cpp" approach is simpler and would fit your needs.

Please note that all above solutions mangle line numbers in errors/warnings generated by the config parse code.

Best regards,

                                 Krzysztof Olędzki Received on 2008/05/30 00:13

This archive was generated by hypermail 2.2.0 : 2008/05/30 00:15 CEST