[Fai-commit] r3697 - trunk/bin
fai-commit at lists.alioth.debian.org
fai-commit at lists.alioth.debian.org
Sun Jul 30 17:45:52 UTC 2006
Author: lange
Date: 2006-07-30 17:45:51 +0000 (Sun, 30 Jul 2006)
New Revision: 3697
Modified:
trunk/bin/make-fai-nfsroot
Log:
append default value of $FAI_LOCATION to $NFSROOT/etc/fai.conf if
undefined in /etc/fai/faic.conf, appen install server IP address to
$NFSROOT/etc/hosts
Modified: trunk/bin/make-fai-nfsroot
===================================================================
--- trunk/bin/make-fai-nfsroot 2006-07-30 17:43:01 UTC (rev 3696)
+++ trunk/bin/make-fai-nfsroot 2006-07-30 17:45:51 UTC (rev 3697)
@@ -192,6 +192,9 @@
echo "root:$FAI_ROOTPW" | $ROOTCMD chpasswd --encrypted
cd $NFSROOT
cp -Rpv $cfdir/* $NFSROOT/etc/fai
+ # append additional variables to fai.conf for the install clients
+ [ -z "$FAI_LOCATION" ] && echo "\$FAI_LOCATION=`hostname`:$FAI_CONFIGDIR" >> $NFSROOT/etc/fai/fai.conf
+
# remove some files that should not be copied
rm -f $NFSROOT/etc/fai/make-fai-nfsroot.conf
[ -f $cfdir/.cvspass ] && cp -p $v $cfdir/.cvspass $NFSROOT/.cvspass
@@ -250,6 +253,8 @@
egrep -q "127.0.0.1" etc/hosts 2>/dev/null || echo "127.0.0.1 localhost" >> etc/hosts
egrep -q "$NFSROOT_ETC_HOSTS" etc/hosts 2>/dev/null || echo "$NFSROOT_ETC_HOSTS" >> etc/hosts
+
+ getent hosts `hostname` >> /etc/hosts
# we need these option before installing the first package. So we
# can't put this into fai-nfsroot /etc/apt/apt.conf.d/90fai
cat <<EOF >$NFSROOT/etc/apt/apt.conf.d/10fai
More information about the Fai-commit
mailing list