[Resolvconf-devel] Bug#460609: resolvconf: Please add support for domain-search
Andrew Pollock
apollock at debian.org
Mon Jan 14 00:33:43 UTC 2008
Package: resolvconf
Version: 1.38
Severity: wishlist
Tags: patch
Hello,
I've just added support to dhcp3-client for the new domain-search
option. This now does the right thing to /etc/resolv.conf if resolvconf
isn't in use.
For users to get the full benefit if resolvconf *is* in use, a small
modification to the hook will be required.
I realise that resolvconf combines the "domain" and "search" directives
in resolv.conf, I've just set both for parity with the way they're set
in dhclient-script (and for what it's worth, the way MacOS X 10.5 seems
to treat the domain-search DHCP option being set).
regards
Andrew
-------------- next part --------------
--- dhclient-script.kfreebsd 2007-10-27 16:20:30.422015899 -0700
+++ /tmp/dhclient-script 2008-01-13 15:04:29.476157674 -0800
@@ -17,8 +17,14 @@
local new_resolv_conf=/etc/resolv.conf.dhclient-new
rm -f $new_resolv_conf
if [ -n "$new_domain_name" ]; then
- echo search $new_domain_name >>$new_resolv_conf
+ echo domain $new_domain_name >>$new_resolv_conf
fi
+ if [ -n "$new_domain_search" ]; then
+ if [ -n "$new_domain_name" ]; then
+ new_domain_search="$new_domain_name $new_domain_search"
+ fi
+ echo "search ${new_domain_search/\\032/ }" >> $new_resolv_conf
+ fi
if [ -n "$new_domain_name_servers" ]; then
for nameserver in $new_domain_name_servers; do
echo nameserver $nameserver >>$new_resolv_conf
More information about the Resolvconf-devel
mailing list