RSS feed

Re: nslcd config and debconf

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

Re: nslcd config and debconf

Arthur de Jong <> писал(а) в своём письме Tue, 09 Oct 2012 23:41:20 +0400:
The basis for the behaviour is that package configuration using
dpkg-reconfigure should preserve manual administrator changes to the
configuration files.

Hmmm. From 'man dpkg-reconfigure' page:
"dpkg-reconfigure reconfigures packages after they have already been installed. Pass it the names of a package or packages to reconfigure. It will ask configuration questions, much like when the package was first installed."

Note here, that debconf db is just a cache of my own answers (customizations).

The dilemma here is that these manual administrator changes you mean are already presented in the configuration file at reconfiguring, and I can not see any reason to preserve them, since they are already in-place.

Instead, I have a dubious situation where my own selections are just unconditionally overwritten where my wish is to recover initial package config with configuration preferences I have already done previously.

The postinst updates the configuration file based on the values in the
debconf database but the config script reads the current values from the
config file first in order to preserve the changes. When running
dpkg-reconfigure the reconfiguration is done between running the config
script and running the postinst.

Have not found the above in debconf-devel(7), but found the following:

"It just examines the state of the system, and asks questions, and debconf stores the answers to be
acted  on  later by the postinst script."

If the nslcd.conf file is absent the nslcd config script will use any
existing debconf values and fall back to guessing sane values depending
on the environment (e.g. use dc=example,dc=com if the system is in the domain).

Agree, no problem here, if the parameter to be configured was not found in configuration file.

This means that upon installation debconf preseeding is an option. For
other automated changes to the configuration file, this will have to be
done by modifying nslcd.conf.

Does it mean that "reconfigure" part (you mentioned before) is unsupported in nslcd?

More background information is available in the debconf-devel(7) manual
page. One of the key points from it: "The issue to watch out for here is
that debconf is not intended to be, and must not be used as a registry."

There is a text after: "This is unix after all, and programs are configured by files in /etc".

I agree with this, and indeed I meant my own answers to debconf questions, not configuration files or programs in /etc.

I care here about my customized answers, that are unconditionally overwriten with a good tool 'dpkg-reconfigure' due to config script, that "cares" of my customizations via updating cached answers. Please, take some attention to the fact that these "carefully" saved parameters can not be used anymore, since they are always to be updated by maintainer script.

Hope this clarifies some things,

Perhaps, I understand that this is more a debconf design issue, and nslcd is always works as expected. But I suppose, that instead of unconditional update and before reconfigure with debconf cache db at some important parameter it is better to look at db contents - perhaps necessary value there is already was set, and which came from already answered debconf question.

Here is also a wiki page on debconf: :

"After package installation, it is possible to go back and change the configuration of a package by using the dpkg-reconfigure program, or another program such as Synaptic."

Perhaps they are unclear with that subject, but the awaiting from debconf is very clear - store my answers to reuse them later.

I could supply some scripting example (e.g. nslcd.config) to display what I mean.

Also Im very interested in your own opinion on this subject since you have great and deep experience in not only developing, but debianized packaging of your excellent nslcd package, thanks!

Thanks for long reading!

To unsubscribe send an email to or see