]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
If the DNS search list is a direct match for the domain then
authorRoy Marples <roy@marples.name>
Thu, 1 Aug 2013 10:03:27 +0000 (10:03 +0000)
committerRoy Marples <roy@marples.name>
Thu, 1 Aug 2013 10:03:27 +0000 (10:03 +0000)
don't bother writing the search option to resolv.conf

dhcpcd-hooks/20-resolv.conf

index 7a5f9534143cd72fd9d76ee43e506eec6b2cdcb4..54e10c89615a712cadc48358bfe6a7644320104f 100644 (file)
@@ -113,7 +113,9 @@ add_resolv_conf()
                        new_domain_search="$*"
                fi
        fi
-       if [ -n "$new_domain_search" ]; then
+       if [ -n "$new_domain_search" -a \
+           "$new_domain_search" != "$new_domain_name" ]
+       then
                if valid_domainname_list; then
                        conf="${conf}search $new_domain_search$NL"
                else