[debian-lan-devel] [SCM] Debian-LAN development and packaging branch, master, updated. 0.6-24-g3b1368a

Andreas B. Mundt andi at debian.org
Mon Aug 20 09:10:42 UTC 2012


The following commit has been merged in the master branch:
commit 3b8fbf743ee70f96f5dae41044f42db77678eacf
Author: Andreas B. Mundt <andi at debian.org>
Date:   Sat Aug 18 08:37:20 2012 +0200

    Define FAI_CONFIG_SRC on the (pxe) kernel command line.  Keep script.
    
    Use fai-chboot -u $FAI_CONFIG_SRC  to define the config space on the
    kernel command line.  Keep the script for reference or rebuilding the
    nfsroot later.

diff --git a/fai/config/files/etc/rc.local/FAISERVER b/fai/config/files/etc/rc.local/FAISERVER
index e2af5b8..ff45b71 100755
--- a/fai/config/files/etc/rc.local/FAISERVER
+++ b/fai/config/files/etc/rc.local/FAISERVER
@@ -38,12 +38,15 @@ if wget --quiet --output-document=/tmp/fai-setup $URL ; then
     NUM=0
     for i in `seq WS_RANGE` ; do
 	NUMSTR=`printf "%02d" $NUM`
-	fai-chboot -IFv workstation$NUMSTR  2>&1 | tee -a /var/log/fai/fai-chboot.log
+	fai-chboot -IFvu $FAI_CONFIG_SRC workstation$NUMSTR  2>&1 | tee -a /var/log/fai/fai-chboot.log
 	NUM=$(($NUM+1))
     done
-    ## remove me, things are prepared now:
-    mv -v /etc/rc.local.pre_fcopy $0
 
+    if [ "$0" = "/etc/rc.local" ] ; then
+        ## things are prepared now, keep script for reference:
+	mv -v $0 $0_setup
+	mv -v /etc/rc.local.pre_fcopy $0
+    fi
     ## The following message is sed for diskless servers when fcopy'd:
     #DISKLESS_INFO
 
diff --git a/fai/config/scripts/FAISERVER/10-config b/fai/config/scripts/FAISERVER/10-config
index aa1fb66..7f40f80 100755
--- a/fai/config/scripts/FAISERVER/10-config
+++ b/fai/config/scripts/FAISERVER/10-config
@@ -5,9 +5,9 @@ set -e
 fcopy -r /etc/fai
 
 if [ $FAI_ACTION == "install" ]; then
-    ## fetch template and seed 'number' of workstations:
+    ## fetch template and insert 'number' of workstations:
     fcopy  /etc/rc.local
-    sed -i "s/WS_RANGE/$WS_RANGE/" $target/etc/rc.local
+    sed -i "s/WS_RANGE/${WS_RANGE}/g" $target/etc/rc.local
 
     if ifclass DISKLESS_SERVER ; then
 	sed -i "s/\#DISKLESS_INFO/\

-- 
Debian-LAN development and packaging



More information about the debian-lan-devel mailing list