On Tuesday 02 April 2002 16:32, STARYNKEVITCH Basile wrote:
> We could add a patch to make the configure file optionally
> preprocessed by an external command. A solution could be that if
> the configure path (usually /etc/squid.conf) starts with a '!' then
> it is a command to be piped. The patch is really trivial:
Nice approach. I too like this better than my proposal with a
separate option for the preprocessor. But there is a small problem
here.. ! is a special character in many UNIX shells, making it hard
to use from the command line.. (needs to be quoted in ' quotes) so I
added | as an alternative character.
What is remaining now is #line parsing.. trivial.. done.
Revised patch at the same location as before:
http://devel.squid-cache.org/projects.html#cf_preprocess
When using m4 you should specify the options -E and -s to m4..
squid -f '!m4 -E -s /etc/squid.conf'
Error reporting won't be correct without these options.
> Another possibility would be to adopt some XML syntax for Squid
> configuration file. (This might make its generation cleaner).
Not for Squid-2.. maybe if Squid-3 ever gets off the ground but XML
is probably overly complex for this thing.. A Squid configuration
does not have much of a hierarchy, and XML is best suited for
hierarchically structured data.
Any hierarchical structure superimposed on the Squid configuration
only limits the usefullness of it I think.
Regards
Henrik
Received on Wed Apr 03 2002 - 01:53:19 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:56 MST