sample on how to do debconf integration

Holger Schurig hs4233 at mail.mn-solutions.de
Thu Nov 11 16:14:52 CET 2004


Hi !

Recently, the new debian-installer got auto-installation support via
debconf-preseeding. Currently, FAI doesn't do anything with
debconf. I want to try this, so I created a hooks/mirror.LAST file
which contains this

---------------------------------------------------------
#!/bin/bash
echo "Task mirror"
for cl in $classes; do
        echo "  trying debconf/$cl"
        if [ -f "/fai/debconf/$cl" ]; then
                $ROOTCMD debconf-set-selections <"/fai/debconf/$cl" && echo "  loaded debconf/$cl"
        fi
done

unset cl
---------------------------------------------------------

and in debconf/ I can now have files named like classes, e.g
debconf/X11_BASE:

---------------------------------------------------------
xserver-xfree86 xserver-xfree86/autodetect_mouse        boolean true
xserver-xfree86 xserver-xfree86/autodetect_monitor      boolean true
xserver-xfree86 xserver-xfree86/config/monitor/lcd      boolean false
---------------------------------------------------------

because task 'mirror' runs before task 'instsoft', the debconf should already contain
the needed info for the postinst script. However, I'm not an expert on Debian yet,
so I'm not sure if this is the right approach. If it is so simple, then why isn't it
in FAI already?  :-)


So, any comments about this?



More information about the linux-fai mailing list