Re: [squid-users] best way to merge old conf file into the new one so as to update it in place

From: Adam <adam-s@dont-contact.us>
Date: Tue, 10 Jun 2003 17:39:15 -0700

Henrik wrote:
> I usually fix up the old conf file with the changes needed for the new
> version, if any.
 [ snip ]
> 1. Some time before the upgrade: Clean existing old configuration to
> only have the actual configuration and notes related to why it is
> configured in a certain manner, not the full Squid documentation
> (for this you have squid.conf.default). Also take the time to review
> the configuration to make sure it is configured like intended

Hi Henrik,

Thanks as always for your input. This idea of using a conf file consisting
only of one's own comments and specific/active configs is an excellent
dea - we do create a mini conf with grep for documentation. However, I
like the self-documenting nature of the squid.conf file and since I have 2
admins who back me up on this project (as I them on others), we all
appreciate the fact that all our changes/additions are adjacent the section
with examples/docs. We usually just append a comment with the modifiers
name and the date and below that our change (e.g. #_adam - 030610 and below
that: cache_mem 24MB). However even as I write this, your idea does sound
simpler and more appealing that what I detail below.

Since first posting, a colleague gave me the idea to create an external
parameter/control file that would have all our changes and which could be
run against any new squid.conf file. The file would have a pattern to match
against (usually we just append below the commented out default), an action
(append, substitute, or prepend), and the lines to add or substitute. I am
working on the param file right now and it will look something like this:

# cache_mem 8 MB; append; cache_mem 374 MB

Where "# cache_mem 8 MB" is the pattern to match, "append" is the action and
the thing I append would be one line with my name and today's date (not
shown since the program would automatically 1st add something like: #_adam -
030610) and below that the changes listed (in this case a new line with a
new cache_mem value).

Of course after any update we would still have to look through the config
file for any new features or if we compile in something new that will add
new things to configure, but I thought this would be a way to keep the file
more easily updateable. But perhaps Henrik's solution of just maintaining a
minimal config file and updating that. Doing a diff on the old and new
squid.conf.default files gives me a pretty good idea of what is new/needs to
be checked out. I'll have to sleep on that and decide which way to go
tomorrow. Given the lack of time, perhaps Henrik's idea is the best.

thanks as always for the feedback,

Adam
Received on Tue Jun 10 2003 - 18:40:31 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:17:18 MST