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