[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] network-nat: add domain info for nat-dhcpd
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |