#! /bin/bash

fcopy -Bv /etc/dhcp/dhcpd.conf
fcopy -Bvr /etc/fai
fcopy -v /etc/fai/apt/sources.list /etc/approx/approx.conf

if [ $FAI_ACTION = "install" ]; then

    # use the same sources.list for the server itself and the clients
    cp -a $target/etc/fai/apt $target/etc/

    rm -f $target/etc/resolv.conf

    # create some host entries
    ainsl /etc/hosts "192.168.33.101 demohost"
    ainsl /etc/hosts "192.168.33.102 gnomehost"
    # add entries for 10 hosts called client*
    perl -e 'for (1..10) {printf "192.168.33.%s client%02s\n",$_,$_;}' >> $target/etc/hosts
fi
