[Fai-commit] r6204 - in branches/stable/3.4: bin debian

Michael Prokop mika at alioth.debian.org
Tue Nov 30 22:40:07 UTC 2010


Author: mika
Date: 2010-11-30 22:40:07 +0000 (Tue, 30 Nov 2010)
New Revision: 6204

Modified:
   branches/stable/3.4/bin/fai
   branches/stable/3.4/debian/control
Log:
use hostname= from the kernel command line (closes: #601750)

remove call of live config script

Modified: branches/stable/3.4/bin/fai
===================================================================
--- branches/stable/3.4/bin/fai	2010-11-28 12:39:22 UTC (rev 6203)
+++ branches/stable/3.4/bin/fai	2010-11-30 22:40:07 UTC (rev 6204)
@@ -273,15 +273,17 @@
 export do_init_tasks=0
 [ "$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
+    # if hostname was set on the kernel command line (mostly when booting from CD)
+    for word in $(cat /proc/cmdline) ; do
+        case $word in
+            hostname=*)
+	    HOSTNAME=${word#*hostname=}
+	    ;;
+        esac
+    done
 
+    hostname $HOSTNAME
     export HOSTNAME
 
     renewclass=1 # always renew class list when installing

Modified: branches/stable/3.4/debian/control
===================================================================
--- branches/stable/3.4/debian/control	2010-11-28 12:39:22 UTC (rev 6203)
+++ branches/stable/3.4/debian/control	2010-11-30 22:40:07 UTC (rev 6204)
@@ -73,7 +73,7 @@
 
 Package: fai-nfsroot
 Architecture: all
-Depends: fai-client, live-initramfs, fai-setup-storage
+Depends: fai-client, live-boot|live-initramfs, fai-setup-storage
 Conflicts: fai, fai-kernels
 Description: Fully Automatic Installation nfsroot package
  FAI is a non-interactive system to install, customize and manage




More information about the Fai-commit mailing list