[Fai-commit] r6150 - branches/stable/3.4/bin
Michael Prokop
mika at alioth.debian.org
Fri Oct 15 11:05:11 UTC 2010
Author: mika
Date: 2010-10-15 11:05:02 +0000 (Fri, 15 Oct 2010)
New Revision: 6150
Modified:
branches/stable/3.4/bin/fai
Log:
fai: re-add support for hostname=... bootoption when using live-config
live-config provides hostname handling through a separate script
and $HOSTNAME of bootoption hostname=... isn't available in the
environment any longer.
The argument of the bootoption HOSTNAME=... (uppercase) would be
available in the environment but as we want to be backwards
compatible and continue supporting the hostname=... bootoption
we've to use live-config accordingly if it's available.
Thanks for the bugreport and the initial patch to Karl Wallner.
Thanks: Karl Wallner <fai at karlwallner.de>
Signed-off-by: Michael Prokop <mika at debian.org>
Modified: branches/stable/3.4/bin/fai
===================================================================
--- branches/stable/3.4/bin/fai 2010-10-15 11:04:11 UTC (rev 6149)
+++ branches/stable/3.4/bin/fai 2010-10-15 11:05:02 UTC (rev 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
More information about the Fai-commit
mailing list