Hi

I maintain a package with a config file which has some defaults
in it which are perfectly reasonable. Most of the people want to
change them, though. Therefore, I had a look at debconf and
managed to create a templates and config file which work as they
should.

As a last step, I would like to write some sort of transition
script which parses the old config file (parsing is easy!) and
inserts the values into the database _before_ the user is asked
to fill in the debconf forms.

I tried to do this in the preinst script using some something
like this:

  db_set calamaris/cache_type $CACHE

To make the debconf commands available to my preinst script, I
had to source this one:

  . /usr/share/debconf/confmodule

Due to some debconf magic, this starts up the frontend and asks
the user questions which is not intended here.

Can I preset the values in the database with some dynamic
defaults taken from the config file from the previous version?
The config file was most certainly changed by the user.

Thanks for some pointers.

Regards
-- 
Philipp      | work: [EMAIL PROTECTED]  +41 1 632 60 38
Frauenfelder | home: [EMAIL PROTECTED]    +41 1 862 73 14
[PGP]        | http://www.math.ethz.ch/~pfrauenf/
Proudly running Debian GNU/Linux. See http://www.debian.org/

Reply via email to