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-changelog

[Xen-changelog] [xen-unstable] network-nat: add domain info for nat-dhcp

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] network-nat: add domain info for nat-dhcpd
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 09 Apr 2009 23:00:17 -0700
Delivery-date: Thu, 09 Apr 2009 23:00:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1239193102 -3600
# Node ID 9f945f16bd0224d4b761333366e355837944f21d
# Parent  d61d135291f7fa74ccf56d4b488f2d98847fcba9
network-nat: add domain info for nat-dhcpd

Signed-off-by: Wei Kong <weikong.cn@xxxxxxxxx>
---
 tools/hotplug/Linux/network-nat |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r d61d135291f7 -r 9f945f16bd02 tools/hotplug/Linux/network-nat
--- a/tools/hotplug/Linux/network-nat   Wed Apr 08 10:18:31 2009 +0100
+++ b/tools/hotplug/Linux/network-nat   Wed Apr 08 13:18:22 2009 +0100
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] network-nat: add domain info for nat-dhcpd, Xen patchbot-unstable <=