|
|
|
|
|
|
|
|
|
|
xen-devel
[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
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH] network-nat: add domain info for nat-dhcpd,
Wei Kong <=
|
|
|
|
|