Abusing FAI: standalone auto-installation

Bruce Edge bedge at troikanetworks.com
Tue Jul 23 16:47:43 CEST 2002


I thought the idea was that debconf always read data from config files, if they exist. That's what seperates it from brain dead utilities like linuxconf, which blindly overwrites config files with it's own data.
So, if you are prefilling the debconf database, you need to run whatever it is that generates the config files from the debconf data.
I do that with the ethernet config, I preset the debconf data, then I run dpkg-reconfigure etherconf with the front end set to non-interactive, that regenerates the /etc/network/... files.

eg:

       ETHERCONFSCRIPTNAME=/tmp/etherconf.tmp.$$
       cat > $target/$ETHERCONFSCRIPTNAME <<-EOF
       # Source debconf library.
       . /usr/share/debconf/confmodule

       db_set etherconf/INT-devices $device
       db_set etherconf/configure true

       db_register etherconf/configure etherconf/configure:$device
       db_set etherconf/configure:$device true

       db_register etherconf/dhcp-p etherconf/dhcp-p:$device
       db_set etherconf/dhcp-p false
       db_set etherconf/dhcp-p:$device false

       db_register etherconf/dhcphost etherconf/dhcphost:$device

       db_set etherconf/domainname $DOMAINNAME

       db_register etherconf/gateway etherconf/gateway:$device
       db_set etherconf/gateway:$device $GATEWAYS

       db_set etherconf/hostname $HOSTNAME

       db_register etherconf/ipaddr etherconf/ipaddr:$device
       db_set etherconf/ipaddr:$device $IPADDR

       db_set etherconf/nameservers $NAMESERVERS

       db_register etherconf/netmask etherconf/netmask:$device
       db_set etherconf/netmask:$device $NETMASK

       db_register etherconf/removable etherconf/removable:$device
       db_set etherconf/removable:$device false

       db_set etherconf/replace-existing-files true

       db_go

       EOF
       chmod +x $target/$ETHERCONFSCRIPTNAME
       $ROOTCMD $ETHERCONFSCRIPTNAME

       $ROOTCMD /usr/sbin/dpkg-reconfigure -f noninteractive etherconf


-Bruce.

> -----Original Message-----
> From: Marc SCHAEFER [mailto:alphanet-linux-fai at alphanet.ch]
> Sent: Monday, July 22, 2002 11:59 AM
> To: linux-fai at uni-koeln.de
> Subject: Re: Abusing FAI: standalone auto-installation
> 
> 
> On Thu, 4 Jul 2002, Niall Young wrote:
> 
> > as one of the core methods, feeding it a pre-filled debconf 
> database.
> 
> A question on the `pre-filled debconf database'. I had 
> recently a `clash'
> (quite friendly) with the `locales' maintainer which was doing:
> 
>    - if /etc/locale.gen contains something, replaces the 
> debconf database
>      with that.
> 
>    - else, set "" in the debconf database.
> 
> I objected that I didn't see the use of debconf, and that I 
> would prefer
> defaults to be taken from debconf in this case instead of 
> setting to an
> empty string. I was replied that debconf is no registry, and 
> that I can't
> expect anything when prefilling debconf.
> 
> Apparently, the only solution is to implement an artificial debconf
> frontend which will use another database and send the 
> pre-stored database
> answers when required.
> 
> How does this impact FAI ? 
> 
> 
> 
> 



More information about the linux-fai mailing list