Package: dhcp3-client Version: 3.1.1-1 Tags: patch User: [EMAIL PROTECTED] Usertags: origin-ubuntu ubuntu-patch intrepid
Attached patch changes the Linux dhclient script to keep the original domain/search value in resolv.conf if the DHCP server does not send one. That way, such DHCP requests do not constantly clobber a manual configuration in resolv.conf. Thanks for considering, Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
--- dhcp3-3.1.1/debian/dhclient-script.linux
+++ dhcp3-3.1.1/debian/dhclient-script.linux
@@ -14,10 +14,12 @@
make_resolv_conf() {
if [ -n "$new_domain_name" -o -n "$new_domain_name_servers" ]; then
local new_resolv_conf=/etc/resolv.conf.dhclient-new
rm -f $new_resolv_conf
if [ -n "$new_domain_name" ]; then
echo domain ${new_domain_name%% *} >>$new_resolv_conf
+ else # keep old domain
+ egrep -i '^ *[[:space:]]*domain' /etc/resolv.conf >> $new_resolv_conf
fi
if [ -n "$new_domain_search" ]; then
new_domain_search="${new_domain_search% }"
@@ -27,6 +29,8 @@
echo "search ${new_domain_search//\\032/ }" >> $new_resolv_conf
elif [ -n "$new_domain_name" ]; then
echo "search ${new_domain_name}" >> $new_resolv_conf
+ else # keep old search list
+ egrep -i '^ *[[:space:]]*search' /etc/resolv.conf >> $new_resolv_conf
fi
if [ -n "$new_domain_name_servers" ]; then
for nameserver in $new_domain_name_servers; do
signature.asc
Description: Digital signature

