Debconf Was: Etherconf (fwd)

Joerg Lehmann joerg at luga.de
Wed May 1 11:22:45 CEST 2002


Hi Matthew, 

On 01.05.02, Matthew Palmer wrote:
> Yup, that'll work if you've specified /var/cache/debconf/confif.dat as a DB
> file.  There are a variety of different methods to store Debconf config data
> - one of them is an LDAP backend I wrote, which means you can store all the
> config for all your machines in a centralised LDAP DB.  Using the lovely
> stacking driver, you can even have a general config DB (for everything that
> is common to all machines) and have an overriding DB for each machine, which
> contains settings unique to each machine (like hostname, IP address, etc).

And you could also do the whole thing class based, e.g. by creating 
config.dat snippets for each class (like /fai/debconf/DEFAULT, 
/fai/debconf/NFS_SERVER, etc.). Those can then be joined with the 
stacked driver. The most simple way for me to do this was to just create a 
customized /etc/debconf.conf file, for instance with the attached
instsoft.HOOK. Even better, of course, would be to integrate a class
based stacked driver into debconf.

Just my 2 cents,

	Joerg

--instsoft.HOOK-------------------------------------------------------------

#!/bin/sh
# This hook creates a new /etc/debconf.conf from the list of
# defined classes

DC_CONF=$target/etc/debconf.conf

# first, generate the class independent part
cat <<EOF > $DC_CONF
#
# This file is automatically created by fai
#
Config: stackeddb
Templates: templatedb

Name: localdb
Driver: File
Filename: /var/cache/debconf/config.dat

Name: templatedb
Driver: File
Mode: 644
Filename: /var/cache/debconf/templates.dat

EOF

# now, define the various databases for the classes
for class in $classes; do
        if [ -f "/fai/debconf/$class" ]; then
                cat <<-EOF >> $DC_CONF
                Name: $class
                Driver: File
                Filename: /fai/debconf/$class
                Readonly: true
                Required: false

                EOF
                [ $stack ] && stack="$stack, "
                stack="$stack$class"
        fi
done

# finally, define the stacked database
cat <<EOF >> $DC_CONF
Name: stackeddb
Driver: Stack
Stack: $stack

EOF



More information about the linux-fai mailing list