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

Andreas B. Mundt andi.mundt at web.de
Mon Apr 9 10:59:43 UTC 2012


The following commit has been merged in the master branch:
commit b18d87c64fa1bd9e71c94201e39bd6619d867df7
Author: Andreas B. Mundt <andi.mundt at web.de>
Date:   Mon Apr 9 12:47:58 2012 +0200

    Make sure diskless clients have the correct nameserver available.
    
    Fix to provide the correct nameserver for diskless clients in the
    chroot's '/etc/resolv.conf'.  A template for 'resolv.conf' is provided
    and the correct nameserver is sed at install time.

diff --git a/fai/config/files/etc/resolv.conf/DISKLESS_CLIENT b/fai/config/files/etc/resolv.conf/DISKLESS_CLIENT
index 71a6b67..7c0a4ce 100644
--- a/fai/config/files/etc/resolv.conf/DISKLESS_CLIENT
+++ b/fai/config/files/etc/resolv.conf/DISKLESS_CLIENT
@@ -1,2 +1,2 @@
-nameserver 10.0.0.1
+nameserver NAMESERVER
 search intern
diff --git a/fai/config/scripts/DISKLESS_CLIENT/10-misc b/fai/config/scripts/DISKLESS_CLIENT/10-misc
index ed30812..10d5297 100755
--- a/fai/config/scripts/DISKLESS_CLIENT/10-misc
+++ b/fai/config/scripts/DISKLESS_CLIENT/10-misc
@@ -5,9 +5,13 @@
 
 set -e
 
-fcopy -v /etc/resolv.conf
 fcopy -v /etc/hosts
 
+## fetch template and fill in nameserver's IP address:
+fcopy -v /etc/resolv.conf
+IP=`host ns | tail -n 1 | awk '{print $NF}'`
+sed -i "s/NAMESERVER/$IP/" $target/etc/resolv.conf
+
 ## timezone
 echo $TIMEZONE > $target/etc/timezone
 cp -f /usr/share/zoneinfo/${TIMEZONE} $target/etc/localtime

-- 
Debian-LAN development and packaging



More information about the debian-lan-devel mailing list