[debian-lan-devel] [SCM] Debian-LAN development and packaging branch, master, updated. 9c2fad591894211c461d538cbec0cdc88dd4a11f

Andreas B. Mundt andi.mundt at web.de
Sat Jan 21 12:28:03 UTC 2012


The following commit has been merged in the master branch:
commit 9c2fad591894211c461d538cbec0cdc88dd4a11f
Author: Andreas B. Mundt <andi.mundt at web.de>
Date:   Sat Jan 21 13:24:02 2012 +0100

    Some cleanup and renaming, various fixes concerning the diskless
    clients setup.  To be tested on real hardware.
    The DISKLESS_SERVER class is up to now not independent, i.e.
    it works only on the mainserver.  To make it independent, PXE stuff
    needs to be added.

diff --git a/fai/config/class/50-host-classes b/fai/config/class/50-host-classes
index ebd2620..15af8c2 100755
--- a/fai/config/class/50-host-classes
+++ b/fai/config/class/50-host-classes
@@ -39,7 +39,7 @@ case $HOSTNAME in
 	# echo "FAIBASE DHCPC $WORKSTATION_A XORG DESKTOP GERMAN" ;;
 	echo "FAIBASE DHCPC $WORKSTATION_A XORG DESKTOP" ;;
     diskless)
-        echo "$WORKSTATION_A XORG DISKLESS"
+        echo "$WORKSTATION_A XORG DISKLESS_CLIENT"
         ## skip GRUB_PC below:
         exit 0 ;;
     *)
diff --git a/fai/config/debconf/DISKLESS b/fai/config/debconf/DISKLESS_CLIENT
similarity index 100%
rename from fai/config/debconf/DISKLESS
rename to fai/config/debconf/DISKLESS_CLIENT
diff --git a/fai/config/files/etc/bind/db.10.in-addr.arpa/SERVER_A b/fai/config/files/etc/bind/db.10.in-addr.arpa/SERVER_A
index 4801f3e..379b8b8 100644
--- a/fai/config/files/etc/bind/db.10.in-addr.arpa/SERVER_A
+++ b/fai/config/files/etc/bind/db.10.in-addr.arpa/SERVER_A
@@ -68,6 +68,46 @@ $TTL 500
 107.0.0                 PTR     workstation57.intern.
 108.0.0                 PTR     workstation58.intern.
 109.0.0                 PTR     workstation59.intern.
+110.0.0                 PTR     workstation60.intern.
+111.0.0                 PTR     workstation61.intern.
+112.0.0                 PTR     workstation62.intern.
+113.0.0                 PTR     workstation63.intern.
+114.0.0                 PTR     workstation64.intern.
+115.0.0                 PTR     workstation65.intern.
+116.0.0                 PTR     workstation66.intern.
+117.0.0                 PTR     workstation67.intern.
+118.0.0                 PTR     workstation68.intern.
+119.0.0                 PTR     workstation69.intern.
+120.0.0                 PTR     workstation70.intern.
+121.0.0                 PTR     workstation71.intern.
+122.0.0                 PTR     workstation72.intern.
+123.0.0                 PTR     workstation73.intern.
+124.0.0                 PTR     workstation74.intern.
+125.0.0                 PTR     workstation75.intern.
+126.0.0                 PTR     workstation76.intern.
+127.0.0                 PTR     workstation77.intern.
+128.0.0                 PTR     workstation78.intern.
+129.0.0                 PTR     workstation79.intern.
+130.0.0                 PTR     workstation80.intern.
+131.0.0                 PTR     workstation81.intern.
+132.0.0                 PTR     workstation82.intern.
+133.0.0                 PTR     workstation83.intern.
+134.0.0                 PTR     workstation84.intern.
+135.0.0                 PTR     workstation85.intern.
+136.0.0                 PTR     workstation86.intern.
+137.0.0                 PTR     workstation87.intern.
+138.0.0                 PTR     workstation88.intern.
+139.0.0                 PTR     workstation89.intern.
+140.0.0                 PTR     workstation90.intern.
+141.0.0                 PTR     workstation91.intern.
+142.0.0                 PTR     workstation92.intern.
+143.0.0                 PTR     workstation93.intern.
+144.0.0                 PTR     workstation94.intern.
+145.0.0                 PTR     workstation95.intern.
+146.0.0                 PTR     workstation96.intern.
+147.0.0                 PTR     workstation97.intern.
+148.0.0                 PTR     workstation98.intern.
+149.0.0                 PTR     workstation99.intern.
 150.0.0                 PTR     diskless00.intern.
 151.0.0                 PTR     diskless01.intern.
 152.0.0                 PTR     diskless02.intern.
@@ -128,3 +168,43 @@ $TTL 500
 207.0.0                 PTR     diskless57.intern.
 208.0.0                 PTR     diskless58.intern.
 209.0.0                 PTR     diskless59.intern.
+210.0.0                 PTR     diskless60.intern.
+211.0.0                 PTR     diskless61.intern.
+212.0.0                 PTR     diskless62.intern.
+213.0.0                 PTR     diskless63.intern.
+214.0.0                 PTR     diskless64.intern.
+215.0.0                 PTR     diskless65.intern.
+216.0.0                 PTR     diskless66.intern.
+217.0.0                 PTR     diskless67.intern.
+218.0.0                 PTR     diskless68.intern.
+219.0.0                 PTR     diskless69.intern.
+220.0.0                 PTR     diskless70.intern.
+221.0.0                 PTR     diskless71.intern.
+222.0.0                 PTR     diskless72.intern.
+223.0.0                 PTR     diskless73.intern.
+224.0.0                 PTR     diskless74.intern.
+225.0.0                 PTR     diskless75.intern.
+226.0.0                 PTR     diskless76.intern.
+227.0.0                 PTR     diskless77.intern.
+228.0.0                 PTR     diskless78.intern.
+229.0.0                 PTR     diskless79.intern.
+230.0.0                 PTR     diskless80.intern.
+231.0.0                 PTR     diskless81.intern.
+232.0.0                 PTR     diskless82.intern.
+233.0.0                 PTR     diskless83.intern.
+234.0.0                 PTR     diskless84.intern.
+235.0.0                 PTR     diskless85.intern.
+236.0.0                 PTR     diskless86.intern.
+237.0.0                 PTR     diskless87.intern.
+238.0.0                 PTR     diskless88.intern.
+239.0.0                 PTR     diskless89.intern.
+240.0.0                 PTR     diskless90.intern.
+241.0.0                 PTR     diskless91.intern.
+242.0.0                 PTR     diskless92.intern.
+243.0.0                 PTR     diskless93.intern.
+244.0.0                 PTR     diskless94.intern.
+245.0.0                 PTR     diskless95.intern.
+246.0.0                 PTR     diskless96.intern.
+247.0.0                 PTR     diskless97.intern.
+248.0.0                 PTR     diskless98.intern.
+249.0.0                 PTR     diskless99.intern.
diff --git a/fai/config/files/etc/fai/NFSROOT/FAISERVER b/fai/config/files/etc/fai/NFSROOT/FAISERVER
new file mode 100644
index 0000000..6be52eb
--- /dev/null
+++ b/fai/config/files/etc/fai/NFSROOT/FAISERVER
@@ -0,0 +1,42 @@
+# package list for creating the NFSROOT
+
+PACKAGES aptitude
+nfs-common fai-nfsroot module-init-tools ssh rdate lshw portmap
+rsync lftp less dump reiserfsprogs e2fsprogs usbutils
+hwinfo psmisc pciutils hdparm smartmontools parted mdadm lvm2
+dnsutils ntpdate dosfstools jove xfsprogs xfsdump
+procinfo dialog discover
+console-tools console-common
+iproute udev subversion liblinux-lvm-perl
+
+# needed for the simple examples
+cfengine2 libapt-pkg-perl
+
+# you should not edit the lines below
+# architecture dependend list of packages that are installed
+
+PACKAGES aptitude I386
+grub lilo read-edid
+linux-image-686
+
+# packages for lenny:
+# linux-image-486 aufs-modules-2.6-486
+
+PACKAGES aptitude AMD64
+grub lilo
+linux-image-2.6-amd64
+# packages for lenny:
+# linux-image-2.6-amd64 aufs-modules-2.6-amd64
+
+PACKAGES aptitude IA64
+elilo gnu-efi efibootmgr
+
+PACKAGES aptitude SPARC
+silo sparc-utils
+
+PACKAGES aptitude ALPHA
+aboot
+
+PACKAGES aptitude POWERPC
+linux-image-2.6-powerpc
+yaboot
diff --git a/fai/config/files/etc/rc.local/FAISERVER b/fai/config/files/etc/rc.local/FAISERVER
index b6be3a9..bf932a7 100755
--- a/fai/config/files/etc/rc.local/FAISERVER
+++ b/fai/config/files/etc/rc.local/FAISERVER
@@ -5,12 +5,17 @@ set -e
 ## Setup script run at boot time.
 ## Removed after successful execution. 
 
-echo
-echo "======================================================="
-echo "The nfsroot for FAI may be created by $0 at boot time. "
-echo "To enable, remove the line marked in $0. " 
+############################
 # Remove to enable: 
+echo
+echo "====================================================================="
+echo "The nfsroot for FAI may be created by executing $0."
+echo "This can be done at boot time or manually."
+echo "To enable, remove the lines marked in $0 and"
+echo "reboot or execute $0."
+echo "====================================================================="
 exit 0
+###########################
 
 echo "Creating the nfsroot for FAI."
 
@@ -27,7 +32,7 @@ URL=`echo $FAI_DEBOOTSTRAP | awk '{print $2}'`
 if wget --quiet --output-document=/tmp/fai-setup $URL ; then
     fai-setup -e -v
     ## Create pxelinux boot configuration for workstation*:
-    for i in `seq 0 1` ; do
+    for i in `seq 0 9` ; do
 	for j in `seq 0 9` ; do
 	    fai-chboot -IFv workstation$i$j  2>&1 | tee /var/log/fai/fai-chboot.log 
 	done
diff --git a/fai/config/files/etc/resolv.conf/DISKLESS b/fai/config/files/etc/resolv.conf/DISKLESS_CLIENT
similarity index 100%
rename from fai/config/files/etc/resolv.conf/DISKLESS
rename to fai/config/files/etc/resolv.conf/DISKLESS_CLIENT
diff --git a/fai/config/files/usr/sbin/nbdswapd/SWAP_SERVER b/fai/config/files/usr/sbin/nbdswapd/DISKLESS_SERVER
similarity index 67%
rename from fai/config/files/usr/sbin/nbdswapd/SWAP_SERVER
rename to fai/config/files/usr/sbin/nbdswapd/DISKLESS_SERVER
index 5dbce89..0ca2774 100755
--- a/fai/config/files/usr/sbin/nbdswapd/SWAP_SERVER
+++ b/fai/config/files/usr/sbin/nbdswapd/DISKLESS_SERVER
@@ -4,14 +4,13 @@
 
 ## swap file and size (in MB):
 SWAP=$(mktemp)
-SIZE=$"128"
+SIZE="128"
 
 ## create swap file:
 dd if=/dev/zero of=$SWAP bs=1024k count=0 seek=$SIZE 2> /dev/null
-/sbin/mkswap $SWAP > /dev/null 2>&1
 
 ## start nbd-server:
-PATH=/usr/bin:/bin:$PATH nbd-server 0 $SWAP -C /dev/null > /dev/null 2>&1
+nbd-server 0 $SWAP -C /dev/null > /dev/null 2>&1
 
 ## remove swap file:
 rm -f $SWAP
diff --git a/fai/config/package_config/DISKLESS b/fai/config/package_config/DISKLESS_CLIENT
similarity index 100%
rename from fai/config/package_config/DISKLESS
rename to fai/config/package_config/DISKLESS_CLIENT
diff --git a/fai/config/package_config/SWAP_SERVER b/fai/config/package_config/DISKLESS_SERVER
similarity index 100%
rename from fai/config/package_config/SWAP_SERVER
rename to fai/config/package_config/DISKLESS_SERVER
diff --git a/fai/config/scripts/DISKLESS/10-misc b/fai/config/scripts/DISKLESS_CLIENT/10-misc
similarity index 100%
rename from fai/config/scripts/DISKLESS/10-misc
rename to fai/config/scripts/DISKLESS_CLIENT/10-misc
diff --git a/fai/config/scripts/DISKLESS_CLIENT/20-server b/fai/config/scripts/DISKLESS_CLIENT/20-server
new file mode 100755
index 0000000..977fbf6
--- /dev/null
+++ b/fai/config/scripts/DISKLESS_CLIENT/20-server
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# modifications needed on the server to boot the diskless client
+#
+
+set -e
+
+TEMPLATE=/srv/tftp/fai/pxelinux.cfg/diskless.tmpl
+
+if [ ! -e $TEMPLATE ]; then
+    KERNEL=`basename $(ls /srv/tftp/fai/vmlinuz*)`
+    INITRD=`basename $(ls /srv/tftp/fai/initrd.img*)`
+
+    echo "Creating template with $KERNEL and $INITRD."
+    cat > $TEMPLATE <<EOF
+# template for diskless
+default fai-generated
+
+label fai-generated
+kernel $KERNEL
+append initrd=$INITRD ip=dhcp root=/dev/nfs nfsroot=/opt boot=live
+EOF
+else
+
+    echo "The template $TEMPLATE existes already!"
+fi
+
+fai-chboot -vc diskless default
diff --git a/fai/config/scripts/DISKLESS_SERVER/10-setup b/fai/config/scripts/DISKLESS_SERVER/10-setup
new file mode 100755
index 0000000..0f510f0
--- /dev/null
+++ b/fai/config/scripts/DISKLESS_SERVER/10-setup
@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# setup the diskless+swap server 
+#
+
+fcopy -m root,root,0755 /usr/sbin/nbdswapd
+
+$ROOTCMD update-inetd --add "9572 stream tcp nowait nobody /usr/sbin/tcpd /usr/sbin/nbdswapd"
+
+ainsl $target/etc/exports     "/opt  10.0.0.0/8(async,ro,no_subtree_check,no_root_squash)"
+ainsl $target/etc/hosts.allow "nbdswapd: ALL: keepalive"
diff --git a/fai/config/scripts/KDC_LDAP/10-slapd-KDC b/fai/config/scripts/KDC_LDAP/10-slapd-KDC
index d917bf6..86e7fac 100755
--- a/fai/config/scripts/KDC_LDAP/10-slapd-KDC
+++ b/fai/config/scripts/KDC_LDAP/10-slapd-KDC
@@ -133,7 +133,7 @@ init_KDC() {
     $ROOTCMD kadmin.local -q "addprinc -randkey nfs/mainserver.intern"
     $ROOTCMD kadmin.local -q "ktadd nfs/mainserver.intern"
 
-    for i in `seq 0 1` ; do
+    for i in `seq 0 9` ; do
 	for j in `seq 0 9` ; do
 	    ## NFS principal:
 	    $ROOTCMD kadmin.local -q "addprinc -randkey nfs/workstation${i}${j}.intern"
diff --git a/fai/config/scripts/NFS_SERVER/10-config b/fai/config/scripts/NFS_SERVER/10-config
index e0a24b7..3bbb4f4 100755
--- a/fai/config/scripts/NFS_SERVER/10-config
+++ b/fai/config/scripts/NFS_SERVER/10-config
@@ -26,8 +26,8 @@ editfiles:
 
 	{ ${target}/etc/exports
 	  ## NFS4 without the need to use kerberos for now:
-	  AppendIfNoSuchLine "/srv/nfs4 10.0.0.0/24(sec=krb5p:krb5i:krb5:sys,rw,sync,fsid=0,crossmnt,no_subtree_check)"
-	  AppendIfNoSuchLine "/srv/nfs4/home0 10.0.0.0/24(sec=krb5p:krb5i:krb5:sys,rw,sync,no_subtree_check)"
+	  AppendIfNoSuchLine "/srv/nfs4  10.0.0.0/24(sec=krb5p:krb5i:krb5:sys,rw,sync,fsid=0,crossmnt,no_subtree_check)"
+	  AppendIfNoSuchLine "/srv/nfs4/home0  10.0.0.0/24(sec=krb5p:krb5i:krb5:sys,rw,sync,no_subtree_check)"
 	}
 
 	{ ${target}/etc/fstab
diff --git a/fai/config/scripts/SERVER_A/10-localadmin b/fai/config/scripts/SERVER_A/10-localadmin
index bcc7fb2..6682716 100755
--- a/fai/config/scripts/SERVER_A/10-localadmin
+++ b/fai/config/scripts/SERVER_A/10-localadmin
@@ -10,4 +10,4 @@ fi
 
 ## Make debian-lan-scripts available:
 
-fcopy -r -m root,root,0700 /usr/sbin/
+fcopy -m root,root,0700 /usr/sbin/debian-lan
diff --git a/fai/config/scripts/SWAP_SERVER/10-setup b/fai/config/scripts/SWAP_SERVER/10-setup
deleted file mode 100755
index c87352a..0000000
--- a/fai/config/scripts/SWAP_SERVER/10-setup
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-fcopy -m root,root,755 /usr/sbin/nbdswapd
-
-$ROOTCMD update-inetd --add "9572 stream tcp nowait nobody /usr/sbin/tcpd /usr/sbin/nbdswapd"
-
-ainsl $target/etc/hosts.allow "nbdswapd: ALL: keepalive"

-- 
Debian-LAN development and packaging



More information about the debian-lan-devel mailing list