Re: debconf and program generated config
On Tue, Apr 05, 2005 at 01:29:50AM +0200, Michelle Konzack wrote:
> Hello,
>
> This is the first experience using debconf to configure a bunch of
> options in a program.
>
> The program I am packing generate a config at its first start. Then the
> admin must config it and can use the program, else it will not start.
> Now I have created the "templates", "config", "postinst" and "postrm"
>
> But I do not know, how to handel the initial config creation.
>
> Is it OK, if I
The files are typically used as follows:
templates: defines the interactive prompts
config: this is a shell script which asks the questions defined by
templates. It handles things like "if you answer yes to X, then
ask Y, but not if you answer no". It exists such that the
package can be "preconfigured" (otherwise config would just be in
postinst).
postinst: this is run after a packages files have been extracted.
It should create any non-conffile configuration files. It might
read in some values from debconf to do so.
>
> __( '/home/michelle.konzack/src/tddyndns-0.9.0/debian/postinst' )_____
> /
> | #!/bin/sh -e
> |
> | tddyndns >/dev/null 2>&1
This creates an initial config file?
And then you have to modify that file based on dd_email_{to,from} and
dd_smtp_options?
> So, postinst will create the initial config
> and after this I continue with debconf ?
Debconf is the thing that the config script does, and it is the thing
from which the postinst script will retrieve the values which you will
use to modify the configuration file (with sed, say).
Justin
Reply to: