[Xymon] make install overwrites xymon-apache.conf (and creates unnecessary bak files)

SebA spah at syntec.co.uk
Tue Dec 13 13:00:42 CET 2011


xymon-bounces at xymon.com wrote:
> On 07-12-2011 12:59, SebA wrote:
>> On the latest trunk, a make install overwrites xymon-apache.conf
>> without either merging in my additions to it, or making a backup of
>> the existing file. This resulted in me losing the additions that I
>> made to it on Monday. Rather annoying.
> 
> Indeed. I've changed the installation so it will not overwrite an
> existing file. 

Great!  Thanks for all your work!

>> As a small aside, another untidyness is that the make install process
>> seems to be creating backup copies of files that have NOT changed
>> since the last install: [etc]# ls -l | grep "Dec 7"
>> -rw-r--r-- 1 hobbit hobbit 3374 Dec 7 11:21 cgioptions.cfg
>> -rw-r--r-- 1 hobbit hobbit 3374 Dec 7 11:21 cgioptions.cfg.bak
>> -rw-r--r-- 1 hobbit hobbit 4193 Dec 7 11:21 client-local.cfg
>> -rw-r--r-- 1 hobbit hobbit 4193 Dec 7 11:21 client-local.cfg.bak
>> -rw-r--r-- 1 hobbit hobbit 11524 Dec 7 11:21 columndoc.csv
>> -rw-r--r-- 1 hobbit hobbit 11524 Dec 7 11:21 columndoc.csv.bak
>> -rw-r--r-- 1 hobbit hobbit 0 Dec 7 11:22 cookies.session
>> -rw-rw-r-- 1 hobbit apache 0 Dec 7 11:21 critical.cfg
>> -rw-rw-r-- 1 hobbit apache 0 Dec 7 11:21 critical.cfg.bak
>> -rw-r--r-- 1 hobbit hobbit 74994 Dec 7 11:21 graphs.cfg
>> -rw-r--r-- 1 hobbit hobbit 74994 Dec 7 11:21 graphs.cfg.bak
>> -rw-r--r-- 1 hobbit hobbit 4674 Dec 7 11:21 protocols.cfg
>> -rw-r--r-- 1 hobbit hobbit 4674 Dec 7 11:21 protocols.cfg.bak
>> -rw-r--r-- 1 hobbit hobbit 11118 Dec 7 11:21 tasks.cfg
>> -rw-r--r-- 1 hobbit hobbit 11118 Dec 7 11:21 tasks.cfg.bak
>> -rw-r--r-- 1 hobbit hobbit 4615 Dec 7 11:17 xymon-apache.conf
>> -rw-r--r-- 1 hobbit hobbit 12784 Dec 7 11:21 xymonserver.cfg
>> -rw-r--r-- 1 hobbit hobbit 12784 Dec 7 11:21 xymonserver.cfg.bak
>> 
>> I believe all of these bak files are the same as the originals.
> 
> Probably, if you didn't change the Xymon build configuration.
> 
>> Presumably the previous bak files were lost during this process,
>> which is potentially rather annoying too!
> 
> Saving a backup file has to be your own responsibility. The Xymon
> installer should take care to save the current config-files before
> writing new ones, and that it what it does - it doesn't do version
> control of your setup. 

Of course.  I'll just have to remember not to save my bakup files as .bak!
;) But actually my point was that if one does several make installs in a
very short space of time, either because one is following trunk and there
are some fixes, or because of some other changes one is making, the old
files from a month or so back will be lost. It is very unlikely that one has
made changes to config files in the space of e.g. 2 days since the last make
install. If one is updating an rpm, it will usually check to see if you made
any changes to the config files, and then prompt you to overwrite, preserve
your copy, see the changes as a diff, or go into edit mode on the new file
(IIRC). If you preserve your copy, it will put the new version as
myconfig.dist. If you overwrite, it will put the old version as .old, I
think, or maybe .bak. I presume there is some function rpms can invoke to do
this? Ref: http://www.rpm.org/max-rpm/ch-rpm-upgrade.html Most of the files
I've listed above, I haven't changed from the 'dist' version.  I was just
hoping update pain could be eliminated. (I know it is better than it used to
be.) I'm not necessarily suggesting re-implementing the rpm upgrade system,
but an md5 check on a file to see if it has changed before creating a backup
copy would at least leave the etc folder tidier and mean one wouldn't need
to check for changes made to *all* files by the make install. (I've checked
the md5's on some of the above files, and they are the same.)

> Regards,
> Henrik


Kind regards,

SebA




More information about the Xymon mailing list