[debian-lan-devel] [SCM] Debian-LAN development and packaging branch, master, updated. 0.5-11-ge6cab97

Andreas B. Mundt andi.mundt at web.de
Wed Apr 11 11:34:33 UTC 2012


The following commit has been merged in the master branch:
commit 51a5ac31cb88f77ab5ddcb8768c30f5b9875c8be
Author: Andreas B. Mundt <andi.mundt at web.de>
Date:   Wed Apr 11 10:31:59 2012 +0200

    Split DHCP setup into extra file.

diff --git a/fai/config/scripts/FAISERVER/10-config b/fai/config/scripts/FAISERVER/10-config
index 01be83d..8bb2ece 100755
--- a/fai/config/scripts/FAISERVER/10-config
+++ b/fai/config/scripts/FAISERVER/10-config
@@ -4,61 +4,6 @@ set -e
 
 fcopy -r /etc/fai
 
-if [ $FAI_ACTION != "install" ]; then
-    exit 0
+if [ $FAI_ACTION == "install" ]; then
+    fcopy  /etc/rc.local
 fi
-fcopy  /etc/rc.local
-
-
-## Generate the DHCP configuration file 'dhcpd.conf'.
-## Use variables from corresponding class/*.var file.
-
-mv $target/etc/dhcp/dhcpd.conf $target/etc/dhcp/dhcpd.conf_orig
-
-if [ -z ${NAMESERVER_IPADDR} ] ; then
-    NAMESERVER_IPADDR=$MAINSERVER_IPADDR
-fi
-
-cat > $target/etc/dhcp/dhcpd.conf <<EOF
-# dhcpd.conf generated by $0
-
-option dhcp-max-message-size 2048;
-use-host-decl-names on;
-
-option routers ${GATEWAY};
-option domain-name "intern";
-option domain-name-servers ${NAMESERVER_IPADDR};
-option ntp-servers ntp;
-
-subnet ${SUBNET} netmask ${NETMASK} {
-   allow unknown-clients;
-   range ${RANGE};
-   server-name faiserver;
-   next-server faiserver;
-   filename "fai/pxelinux.0";
-}
-
-group {
-   server-name faiserver;
-   next-server faiserver;
-   filename "fai/pxelinux.0";
-EOF
-
-PREFIX=`echo $SUBNET | cut -d "." --fields=1,2,3`
-
-NUM=0
-for IPADDR in `seq $WS_RANGE` ; do
-    NUMSTR=`printf "%02d" $NUM`
-    echo "   host workstation${NUMSTR} {hardware ethernet A1:B2:C3:D4:E5:${NUMSTR}; fixed-address $PREFIX.$IPADDR;}" \
-	>> $target/etc/dhcp/dhcpd.conf
-    NUM=$(($NUM+1))
-done
-echo >> $target/etc/dhcp/dhcpd.conf
-NUM=0
-for IPADDR in `seq $DL_RANGE` ; do
-    NUMSTR=`printf "%02d" $NUM`
-    echo "   host diskless${NUMSTR} {hardware ethernet A1:B2:C3:D4:E5:${NUMSTR}; fixed-address $PREFIX.$IPADDR;}" \
-	>> $target/etc/dhcp/dhcpd.conf
-    NUM=$(($NUM+1))
-done
-echo "}" >> $target/etc/dhcp/dhcpd.conf
diff --git a/fai/config/scripts/FAISERVER/10-config b/fai/config/scripts/FAISERVER/40-dhcp
similarity index 97%
copy from fai/config/scripts/FAISERVER/10-config
copy to fai/config/scripts/FAISERVER/40-dhcp
index 01be83d..b527d3d 100755
--- a/fai/config/scripts/FAISERVER/10-config
+++ b/fai/config/scripts/FAISERVER/40-dhcp
@@ -2,13 +2,9 @@
 
 set -e
 
-fcopy -r /etc/fai
-
 if [ $FAI_ACTION != "install" ]; then
     exit 0
 fi
-fcopy  /etc/rc.local
-
 
 ## Generate the DHCP configuration file 'dhcpd.conf'.
 ## Use variables from corresponding class/*.var file.

-- 
Debian-LAN development and packaging



More information about the debian-lan-devel mailing list