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-02-01 11:31, Edgar Fuß a écrit :
After some reflexion your case is different, etcupdate(8) is more
oriented towards an admin that updates the system rather than the dev
that updates etc/ because the OS evolved.
I don't get the difference between the two.

postinstall does not propose the admin to merge, compare, delete or insert files when they are different from the original one, it runs checks on specific files and apply the modifications if the checks pass successfully as coded inside postinstall(8). For example, when updating etc/, it can install additional powerd scripts if they are missing.

If anything unexpected happens (for example, files modifications are not the ones expected by postinstall), it will log and leave it to the admin to fix it manually. There is no interface proposed by postinstall to help the admin merge or replace the new files like etcupdate does. It only rely on the checks and fixes someone added to postinstall.

This is where I make the distinction between postinstall and etcupdate. An admin will modify the system to suit his/her needs in ways postinstall cannot anticipate (rc.conf, passwd, etc.). As such another tool gets used to help update the system, etcupdate.

Its the way I see postinstall and etcupdate (opinions may differ). Depending on which role you "play", you will adapt either postinstall or etcupdate. In your specific case, I considered that your modifications are indeed more geared towards etcupdate operation than postinstall, therefore changing my initial mindset.

But in fact, my case is different: I have a (self-written) management
system that takes care of most of the configuration files.
Now on the one hand, after an OS update, for technical reasons, for some of those (syslog.conf, newsyslog.conf, ...), it needs the pristine OS files
installed before runnig while for most, it doesn't.
On the other hand, it doesn't manage some ``dangerous'' files (master.passwd,
group, rc), I take care of those manually and want to make sure I don't
accidently overwrite them on an interactive etcupdate run.

However, what you propose is from my PoV dangerous, you could completely
wreck the conf if you happen to play the wrong "autoanswer" file.
Yes, of course. However, my autoanswer file consists of a few ``m'' entries for the ``dangerous'' files (so I don't overwrite them by accident), very few ``i'' entries (for the special case mentioned above) and mostly ``d''
entries for the bulk of files taken care of by the management system.

--
Jean-Yves Migeon


Home | Main Index | Thread Index | Old Index