FAI Stable release 3.4.4
Manuel Hachtkemper
hacman at math.uni-bonn.de
Fri Nov 5 19:14:18 CET 2010
Hello mika,
> Yes, I've tested it in my automated-FAI-server deployment using
> release 3.4.3 and this patch. It's expected to be fully backwards
> compatible and HOSTNAME shouldn't be necessary anymore.
your patch
# svn diff -c 6150
Index: 3.4/bin/fai
===================================================================
--- 3.4/bin/fai (revision 6149)
+++ 3.4/bin/fai (revision 6150)
@@ -274,6 +274,16 @@
[ "$0" = "/etc/init.d/rcS" ] || [ X$UPSTART_JOB = Xfai ] && do_init_tasks=1
if [ $do_init_tasks -eq 1 ]; then
hostname $HOSTNAME
+
+ # live-config provides hostname handling through a separate script,
+ # $HOSTNAME isn't available in environment any longer
+ if [ -x /lib/live/config.sh ] ; then
+ LIVE_CONFIGS=hostname /lib/live/config.sh
+ HOSTNAME=$(hostname)
+ fi
+
+ export HOSTNAME
+
renewclass=1 # always renew class list when installing
mkdir -p /var/lib/discover /var/discover /etc/sysconfig
fi
breaks our (modified) installation in a DHCP environment.
So what is our problem:
We have deleted the paragraph
# set hostname in $FAI_ROOT
if [ -f /var/run/fai/FAI_INSTALLATION_IN_PROGRESS ]; then
echo $HOSTNAME >$FAI_ROOT/etc/hostname
fi
in the file /usr/lib/fai/subroutines, because it isn't necessary or desired to have a /etc/hostname file if you are using DHCP. ( In revision 5932 Thomas made some changes, which do fix this behaviour. But these changes are only available in trunk, not in 3.4.4.)
We do get the right hostname using DHCP and $HOSTNAME is set.
Next "LIVE_CONFIGS=hostname /lib/live/config.sh" gets executed, which creates a file /etc/hostname with the content/hostname "debian" in it.
As a result of this our FAI_CLASSES don't match any more.
In my opinion this a bug, which needs to be addressed to the live-boot team, because they first should try to get a hostname using DHCP and also shouldn't set /etc/hostname. But in this case also FAI will break for many users, if a newer version of subroutines gets into the debian repositories.
I think we need another solution for trunk, or the people of live-* should fix their code.
Best regards,
Manuel Hachtkemper
-------------- n?chster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : nicht verfügbar
Dateityp : application/pgp-signature
Dateigröße : 197 bytes
Beschreibung: Digital signature
URL : <http://lists.uni-koeln.de/pipermail/linux-fai-devel/attachments/20101105/7ecb372a/attachment.bin>
More information about the linux-fai-devel
mailing list