WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] network-nat: add domain info for nat-dhcpd

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] network-nat: add domain info for nat-dhcpd
From: Wei Kong <weikong.cn@xxxxxxxxx>
Date: Wed, 8 Apr 2009 18:10:07 +0800
Delivery-date: Wed, 08 Apr 2009 03:10:43 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=3e0nTRUrLGdHUcoeDso9X5XhvQjYK5i9rf8X82G3mgc=; b=azztP2AXfIHp8xGbc0C6OerxVpjnmFCAXM2a7g9PGN8/pWikgiP4QY/w2kluvsiIhj uexf7iAHW/fv+1e6Tpd8SNZAdGdYCyerW6HNWeukTBDheYe1WIz3q05CwfWXRRujY+G4 iJl6Urri7nYmhfSOgPYhUwv4tQAHDzi2Hls+Q=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Ddiz15GTH4KXEENsTBfWTDZrWanHIpr6Ys02ZleaUIcF1Tic3sM6q3mnaP+LdBh1pm PCuKKf+jx62wK2hawurWCjM5YaD6I55cocNb4ozw8ugOn9NS3NV33dOhaxrUL7MvsCPM I+58/T8hu+MzKGgSw7FX00Pkq2jcpEscFk5IY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Add domain info for nat-dhcpd.

Signed-off-by: Wei Kong <weikong.cn@gmail.com>

diff -uNrp xen-3.4.0-testing/tools/hotplug/Linux/network-nat xen-3.4.0-testing/tools/hotplug/Linux/network-nat
--- xen-3.4.0-testing/tools/hotplug/Linux/network-nat   2009-04-08 17:31:50.000000000 +0800
+++ xen-3.4.0-testing/tools/hotplug/Linux/network-nat   2009-04-08 17:33:20.000000000 +0800
@@ -48,12 +48,16 @@ then
   fi
 fi

+domain_name=`cat /etc/resolv.conf | grep -v "#" | grep -E 'search|domain' -i | tail -n 1 | awk '{ print $2 }'`
+nameserver=`cat /etc/resolv.conf | grep -v "#" | grep "nameserver" -i -m 1 | awk '{ print $2 }'`

 function dhcp_start()
 {
   if ! grep -q "subnet 10.0.0.0" "$dhcpd_conf_file"
   then
-    echo >>"$dhcpd_conf_file" "subnet 10.0.0.0 netmask 255.255.0.0 {}"
+    echo >>"$dhcpd_conf_file" "subnet 10.0.0.0 netmask 255.255.0.0 {\
+ option domain-name \"$domain_name\";\
+ option domain-name-servers $nameserver; }"
   fi

   "$dhcpd_init_file" restart
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] network-nat: add domain info for nat-dhcpd, Wei Kong <=