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
This commit is contained in:
parent
c353b58b7a
commit
d9c567271e
|
@ -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"
|
||||
|
|
|
@ -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 @@ build_resolv_conf()
|
|||
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 @@ add_resolv_conf()
|
|||
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 @@ 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
|
||||
|
|
Loading…
Reference in New Issue