[Fai-commit] r3060 - in people/michael/features/debconf: . conf
debian scripts
fai-repository at svn.debian.org
fai-repository at svn.debian.org
Thu Nov 17 19:16:35 UTC 2005
Author: michael-guest
Date: 2005-11-17 19:16:32 +0000 (Thu, 17 Nov 2005)
New Revision: 3060
Modified:
people/michael/features/debconf/Makefile
people/michael/features/debconf/conf/fai.conf
people/michael/features/debconf/debian/dirs
people/michael/features/debconf/debian/postinst
people/michael/features/debconf/scripts/make-fai-nfsroot
Log:
readded debconf-support; this code is untested and might be broken...
Modified: people/michael/features/debconf/Makefile
===================================================================
--- people/michael/features/debconf/Makefile 2005-11-17 19:15:58 UTC (rev 3059)
+++ people/michael/features/debconf/Makefile 2005-11-17 19:16:32 UTC (rev 3060)
@@ -43,6 +43,7 @@
install -m644 conf/menu.lst conf/sources.list $(DESTDIR)/etc/fai/
install -m644 conf/fai.conf conf/sources.list $(DESTDIR)/etc/fai/
install -m600 conf/make-fai-nfsroot.conf $(DESTDIR)/etc/fai/
+ install -m644 debian/default.tpl $(DESTDIR)/etc/default/fai
cp -a examples $(DOCDIR)
cp -a utils $(DOCDIR)/examples
cp -a templates/* $(DOCDIR)/examples/advanced
Modified: people/michael/features/debconf/conf/fai.conf
===================================================================
--- people/michael/features/debconf/conf/fai.conf 2005-11-17 19:15:58 UTC (rev 3059)
+++ people/michael/features/debconf/conf/fai.conf 2005-11-17 19:16:32 UTC (rev 3060)
@@ -2,10 +2,7 @@
# /etc/fai/fai.conf -- configuration for FAI (Fully Automatic Installation)
-# installserver must be the name seen by the install clients
-installserver=INSTALLSERVER
-# the name of the Debian mirror, this is also hardcoded in /etc/fai/sources.list
-mirrorhost=ftp.debian.org
+[ -r /etc/default/fai ] && . /etc/default/fai
# Don't use the variable FAI_SOURCES_LIST any more.
# Instead use /etc/fai/sources.list
Modified: people/michael/features/debconf/debian/dirs
===================================================================
--- people/michael/features/debconf/debian/dirs 2005-11-17 19:15:58 UTC (rev 3059)
+++ people/michael/features/debconf/debian/dirs 2005-11-17 19:16:32 UTC (rev 3060)
@@ -10,3 +10,4 @@
usr/lib/fai/nfsroot
usr/share/perl5/Debian
boot/fai
+etc/default
Modified: people/michael/features/debconf/debian/postinst
===================================================================
--- people/michael/features/debconf/debian/postinst 2005-11-17 19:15:58 UTC (rev 3059)
+++ people/michael/features/debconf/debian/postinst 2005-11-17 19:16:32 UTC (rev 3060)
@@ -34,6 +34,17 @@
case "$1" in
configure)
+ . /usr/share/debconf/confmodule
+ # set installserver hostname to a reasonable value with debconf
+ db_get fai/installserver
+ perl -pi -e "s/^installserver=.*\$/installserver=$RET/" /etc/default/fai
+
+ # set mirrorhost in /etc/fai.conf and /etc/fai/sources.list as
+ # defined in debconf db
+ db_get fai/mirrorhost
+ perl -pi -e "s/^mirrorhost=.*\$/mirrorhost=$RET/" /etc/default/fai
+ #db_get fai/run-faisetup-on-install || true
+
echo "Now edit fai.conf, make-fai-nfsroot.conf and sources.list in /etc/fai and call fai-setup."
echo "Especially, you'll have to replace the placeholder INSTALLSERVER in /etc/fai/fai.conf."
;;
Modified: people/michael/features/debconf/scripts/make-fai-nfsroot
===================================================================
--- people/michael/features/debconf/scripts/make-fai-nfsroot 2005-11-17 19:15:58 UTC (rev 3059)
+++ people/michael/features/debconf/scripts/make-fai-nfsroot 2005-11-17 19:16:32 UTC (rev 3060)
@@ -206,6 +206,7 @@
fdivert /etc/dhcp3/dhclient-script /etc/dhcp3/dhclient.conf
cp -p $SHAREFAI/etc/dhclient.conf etc/dhcp3
cp -Rpv $cfdir/* $NFSROOT/etc/fai
+ cp -p /etc/default/fai $NFSROOT/etc/default/
# 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
@@ -276,6 +277,8 @@
echo "I think something is wrong. But I'll try to continue."
}
+ perl -pi -e "s/MIRRORHOST/$mirrorhost/" $NFSROOT/etc/apt/sources.list
+
echo "127.0.0.1 localhost" >> etc/hosts
echo "$NFSROOT_ETC_HOSTS" >> etc/hosts
[ -f /etc/apt/preferences ] && cp -v /etc/apt/preferences $NFSROOT/etc/apt
More information about the Fai-commit
mailing list