Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/dhcpcd/dist Import dhcpcd-6.0.5



details:   https://anonhg.NetBSD.org/src/rev/a38eccca8430
branches:  trunk
changeset: 788996:a38eccca8430
user:      roy <roy%NetBSD.org@localhost>
date:      Sat Aug 03 10:30:01 2013 +0000

description:
Import dhcpcd-6.0.5
 * Fix the domain option (broken in 6.0.4)
 * Don't write a search line in resolv.con if it matches the domain

diffstat:

 external/bsd/dhcpcd/dist/defs.h                      |   4 ++--
 external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf |  20 ++++++++++----------
 2 files changed, 12 insertions(+), 12 deletions(-)

diffs (66 lines):

diff -r 2aa30d1c1c81 -r a38eccca8430 external/bsd/dhcpcd/dist/defs.h
--- a/external/bsd/dhcpcd/dist/defs.h   Sat Aug 03 07:39:31 2013 +0000
+++ b/external/bsd/dhcpcd/dist/defs.h   Sat Aug 03 10:30:01 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.1.1.30 2013/07/29 20:35:33 roy Exp $ */
+/* $NetBSD: defs.h,v 1.1.1.31 2013/08/03 10:30:01 roy Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
@@ -30,7 +30,7 @@
 #define CONFIG_H
 
 #define PACKAGE                        "dhcpcd"
-#define VERSION                        "6.0.4"
+#define VERSION                        "6.0.5"
 
 #ifndef CONFIG
 # define CONFIG                        SYSCONFDIR "/" PACKAGE ".conf"
diff -r 2aa30d1c1c81 -r a38eccca8430 external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf
--- a/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf      Sat Aug 03 07:39:31 2013 +0000
+++ b/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf      Sat Aug 03 10:30:01 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: 20-resolv.conf,v 1.1.1.12 2013/07/29 20:35:33 roy Exp $
+# $NetBSD: 20-resolv.conf,v 1.1.1.13 2013/08/03 10:30:01 roy Exp $
 
 # Generate /etc/resolv.conf
 # Support resolvconf(8) if available
@@ -33,13 +33,12 @@
                search=$(cd "$resolv_conf_dir"; \
                        key_get_value "search " ${interfaces})
                set -- ${domain}
-               unset domain
-               if [ -n "$2" ]; then
-                       search="$search $*"
-               elif [ -n "$1" ]; then
-                       domain="domain $1$NL"
-               fi
-               [ -n "$search" ] && search="search $(uniqify $search)$NL"
+               domain="$1"
+               [ -n "$2" ] && search="$search $*"
+               [ -n "$search" ] && search="$(uniqify $search)"
+               [ "$domain" = "$search" ] && search=
+               [ -n "$domain" ] && domain="domain $domain$NL"
+               [ -n "$search" ] && search="search $search$NL"
 
                # Build the nameserver list
                srvs=$(cd "$resolv_conf_dir"; \
@@ -92,7 +91,6 @@
        fi
 
        # Derive a new domain from our various hostname options
-       new_domain_name=
        if [ -z "$new_domain_name" ]; then
                if [ "$new_dhcp6_fqdn" != "${new_dhcp6_fqdn#*.}" ]; then
                        new_domain_name="${new_dhcp6_fqdn#*.}"
@@ -116,7 +114,9 @@
                        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



Home | Main Index | Thread Index | Old Index