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

Re: Debconf preloading, standard method?

Joey Hess <joey@kitenet.net> wrote:

> Does this seem sane? I haven't ever had to do this so I may not know all
> the requirements. You can do part of this already by stacking a
> preseeded config.dat underneath your regular one and making it
> read-only, but that has the problem of where do you get that config.dat
> from. A simpler file format might be better.

All I can add is that having this in the front-end that takes its
answers from a flat file is very good for doing things like installing
security updated ssh on large clusters of servers you don't have
primary control over or cannot guarantee any particular configuration
(other than a patched debconf);

scp answers target:/etc/debconf/answers
ssh target "DEBIAN_FRONTEND=Managed apt-get install ssh"

About 2 minutes work and 10 minutes to wait for about 40 hosts.  The
RedHat admin took all day and then some to do a similar number of
red bin hakt hosts.

If it was possible to supply the debconf.conf location via an
environment variable, then you could override it for one installation
with two config files.  Or switch between two `stack' drivers.

You could even add another database via an environment variable that
is queried in preference of the defaults in the package template, but
after any local config databases specified in /etc/debconf.conf.  So
then it could be something like

ssh -R 389:ldap:389 root@target \
    "DEBCONF_FALLBACK=LDAP:host=localhost apt-get install ssh"

To log in, specify a temporary forwarded tunnelled ldap connection to
debconf and then install ssh.


scp config.dat root@target:/var/run/config.dat
ssh root@target "DEBCONF_FALLBACK=File:/var/run/config.dat apt-get install ssh"

or, if you know that you can at least get one known entry added to
/etc/debconf.conf, but not left as default:

ssh root@target "DEBCONF_BACKEND=easydb apt-get install ssh"

Take a look at the attached patch, works in the trivial testing I've
attempted here and with the above examples.  Don't know if you want to
put those functions in a separate module or change their semantics a
bit; that's a rough cut.
   Sam Vilain, sam@vilain.net     WWW: http://sam.vilain.net/
    7D74 2A09 B2D3 C30F F78E      GPG: http://sam.vilain.net/sam.asc
    278A A425 30A9 05B5 2F13

Real software engineers don't comment their code.  The identifiers are
so mnemonic they don't have to.

Attachment: debconf.envconfig.patch
Description: Binary data

Reply to: