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

Re: Bug#224828: Split config file is worrying...

Cameron Patrick <cameron@patrick.wattle.id.au> wrote:
> Andreas Metzler wrote:

> | I want to allow people to choose between monolithic and split,

> Yes.

> | and therefore need to safe this informatin in
> | /etc/exim4/update-exim4.conf.conf to modify update-exim4.conf's
> | behavior accordingly.

> No.  update-exim4.conf can determine whether the admin wants to use a
> monolithic config file by whether or not the admin has edited that
> config file.  I described a mechanism for doing that below, which is
> based on what X uses for choosing between hand-edited and dexconf-generated
> configuration.

What you proposed was not a scheme to allow to choose between
monolithic and split but between managed by debconf and edited by

> | The whole point of /etc/exim4/exim4.conf.template is that it is _not_ a
> | generated file but a dpkg-conffile, update-exim4.conf *may* *not*
> | touch it.

> Hmm, that's a good point.  The way X does it is to have XF86Config-4
> /not/ listed as a conffile, but instead create it in the postinst and
> provide conffile-like handling for it (i.e. by always preserving user
> changes in it).

I see. You misunderstood me. The way Branden chose for X and the
thing I offered (exim4.conf.template) are completely different things:

* .template is just conf.d concatenated together, it still uses
u-ex4.conf to merge dpkg-conffile(s) (.template) and a _properly_ [1]
debconf managed configuration file (update-exim4.conf.conf).

* OTOH afaik the X11 packages use an ucf-like[2] approach, dexconf
generates the file and the md5sum is saved, next time the dexconf
scripts run (upgrade or dpkg-reconfigure) first it is checked whether
the saved md5sum matches, if it does not the file won't be touched,
otherwise it will be overwritten by dexconf and the new md5sum is

I won't explain the pros and cons of either approach here unless
somebody asks for it.
               cu andreas

[1] That is: It may be changed with debconf or with an editor, and
debconf will parse it.
[2] It is not ucf, afair there is no dpkg-like prompting if you edited
the file.
[3] I might be misrepresenting it as I am still using woody's X11 and
have direct experience with the sarge or sid packages.
Hey, da ist ein Ballonautomat auf der Toilette!
Unofficial _Debian-packages_ of latest unstable _tin_

Reply to: