if [ ! -d "$FAI_CONFIGDIR/class" ]; then
mkdir -p $FAI_CONFIGDIR
cp -a /usr/share/doc/fai-doc/examples/simple/* $FAI_CONFIGDIR
if [ ! -d "$FAI_CONFIGDIR/class" ]; then
mkdir -p $FAI_CONFIGDIR
cp -a /usr/share/doc/fai-doc/examples/simple/* $FAI_CONFIGDIR
myip=$(ip addr show up| grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1 | grep -v 127.0.0.1)
echo "APTPROXY=http://$myip:3142" >> /srv/fai/config/class/DEBIAN.var
# determine a fast mirror for Ubuntu
myip=$(ip addr show up| grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1 | grep -v 127.0.0.1)
echo "APTPROXY=http://$myip:3142" >> /srv/fai/config/class/DEBIAN.var
# determine a fast mirror for Ubuntu
sed -i -e "s#MIRRORURL#$mirror#" /srv/fai/config/files/etc/apt/sources.list/UBUNTU
fi
# set the LOGUSER, wo we get all the logs from our install clients
sed -i -e "s#MIRRORURL#$mirror#" /srv/fai/config/files/etc/apt/sources.list/UBUNTU
fi
# set the LOGUSER, wo we get all the logs from our install clients