On Mon, 2001-09-10 at 07:41, Brian J. Murrell wrote:
On Mon, Sep 10, 2001 at 03:31:21AM -0500, Lonnie Borntreger wrote:
>
> RedHat ALWAYS replaces the files, sometimes without warning. Then you
> have to check every config file to make sure you didn't lose something.
That is bad (not that I know they actually do that, but if they do...)
My server is running RedHat. I have a couple copies of /etc since I've
highly modified some configuration files and have been burned many
times. I've actually stopped doing many upgrades because I can't afford
the downtime.
[snip]
> The only ways to solve this is (both probably require mods to rpm
> itself):
> 1) (as suggested by the person who started this thread) if the file is
> unchanged from its original default contents (using cmp or sums or
> whatever way to verify), then overwrite it,
Uhm, that is not an idea that needs mods to work. That is how it is
SUPPOSED to work!
Didn't know that.
> else install the new one as
> rpmnew and warn (like now).
No. If the config file is not different than what is in the package
being upgraded, replace the config file. That is the only right way
to do it.
The "else" was dealing with the case that something WAS different.
> 2) Create some logic that can find mods, if any, and merge them into the
> new configuration file. (this would be REALLY hard, since there are SO
> MANY ways a configuration file could be modified -- lines deleted,
> commented out, etc. etc.)
Actually that is not very difficult. You keep an unmodifyable copy of
all config files installed and when the package is upgraded, you diff
between the unmodified copy of the config file and the config file.
If that diff patches into the new config file, patch the config file
after the upgrade and warn.
Interesting. Might not work 100%, but it's a whole lot better than the
logic scenarios I was running through my head.
b.
--
Brian J. Murrell
--
TTFN,
Lonnie Borntreger
------ ------ ------
Our mission is to authoritatively promote timely methods of
empowerment so that we may endeavor to collaboratively supply
inexpensive opportunities to exceed customer expectations