tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Two improvements to etcupdate(8)



Le 2016-01-27 19:36, Edgar Fuß a écrit :
Should this go to tech-install?

I wrote two improvements (or so I think) to etcupdate(8) for which I attach
two separate patches. I must admit I did't test them too hard yet.

1. I never used automatic (-a) mode because I never used it before.
The problem is that unless you used -a last time, you lack the reference
checksums in /var/etcupdate.
So I added a ``bootstrap'' mode (-A) that only builds the checksums from its
-s arguments and doesn't do anything else.
The idea is that you first etcupdate -A -s /path/to/old/etc.tgz and then
etcupdate -a -s /path/to/new/etc.tgz afterwards.

That one seems fine to me, there should be a way to "init/bootstrap" etcupdate if it was not.

2. I regularily update a whole set of machines. I usually did this by
running etcupdate on a development machine, noted the per-file decisions I made (on paper) and then used that list to know what to type to further
etcupdate invocations on the production machines.
I think computers are better at recording and playback than humans, so I added two switches, -W and -R, that record the (hand-made) keep/overwrite/merge decisions to a file resp. use that file to follow the same decisions again. The file doesn't record the details of a merge operations, only the fact,
but manually re-merging three files is an improvement over typing d/i/m
for a hundred files. Or so I think.

Comments/suggestions/improvements (and better names than ``bootstrap'',
``read'' and ``write'') welcome.

bootstrap, record, apply [...]

Does it not collide with the "postinstall fix" operation? I thought postinstall's purpose was to handle all kind of operations that could be "automatically" solved (and log those that required manual intervention), and use etcupdate to handle the m/d/i of specific files (passwd and the like?)

--
Jean-Yves Migeon


Home | Main Index | Thread Index | Old Index