Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/ROY]: src/external/bsd/openresolv/dist Import openresolv-3.5.6
details: https://anonhg.NetBSD.org/src/rev/be473520b331
branches: ROY
changeset: 454312:be473520b331
user: roy <roy%NetBSD.org@localhost>
date: Fri Jul 12 16:50:27 2013 +0000
description:
Import openresolv-3.5.6
Highlights include:
name_servers[_append] and search_domains[_append] now work for subscribers
other than libc.
diffstat:
external/bsd/openresolv/dist/dnsmasq.in | 4 +-
external/bsd/openresolv/dist/libc.in | 12 +++---
external/bsd/openresolv/dist/named.in | 4 +-
external/bsd/openresolv/dist/pdnsd.in | 4 +-
external/bsd/openresolv/dist/resolvconf.in | 52 ++++++++++++++++++++++-------
external/bsd/openresolv/dist/unbound.in | 4 +-
6 files changed, 53 insertions(+), 27 deletions(-)
diffs (204 lines):
diff -r 64e4db5838f0 -r be473520b331 external/bsd/openresolv/dist/dnsmasq.in
--- a/external/bsd/openresolv/dist/dnsmasq.in Tue Jun 04 09:37:21 2013 +0000
+++ b/external/bsd/openresolv/dist/dnsmasq.in Fri Jul 12 16:50:27 2013 +0000
@@ -29,7 +29,7 @@
[ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0
. "@SYSCONFDIR@/resolvconf.conf" || exit 1
[ -z "$dnsmasq_conf" -a -z "$dnsmasq_resolv" ] && exit 0
-[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
+[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)"
NL="
"
@@ -154,7 +154,7 @@
if type config_mkdirs >/dev/null 2>&1; then
config_mkdirs "$dnsmasq_conf" "$dnsmasq_resolv"
else
- @PREFIX@/sbin/resolvconf -D "$dnsmasq_conf" "$dnsmasq_resolv"
+ @SBINDIR@/resolvconf -D "$dnsmasq_conf" "$dnsmasq_resolv"
fi
changed=false
diff -r 64e4db5838f0 -r be473520b331 external/bsd/openresolv/dist/libc.in
--- a/external/bsd/openresolv/dist/libc.in Tue Jun 04 09:37:21 2013 +0000
+++ b/external/bsd/openresolv/dist/libc.in Fri Jul 12 16:50:27 2013 +0000
@@ -80,9 +80,9 @@
SYSCONFDIR="$SYSCONFDIR/resolvconf/resolv.conf.d"
base="$SYSCONFDIR/resolv.conf.d/base"
if [ -f "$base" ]; then
- name_servers="$(key_get_value "nameserver " "$base")"
+ prepend_nameservers="$(key_get_value "nameserver " "$base")"
domain="$(key_get_value "domain " "$base")"
- search_domains="$(key_get_value "search " "$base")"
+ prepend_search="$(key_get_value "search " "$base")"
resolv_conf_options="$(key_get_value "options " "$base")"
resolv_conf_sortlist="$(key_get_value "sortlist " "$base")"
fi
@@ -97,7 +97,7 @@
: ${resolv_conf:=/etc/resolv.conf}
: ${libc_service:=nscd}
: ${libc_restart:=@RESTARTCMD ${libc_service}@}
-: ${list_resolv:=@PREFIX@/sbin/resolvconf -l}
+: ${list_resolv:=@SBINDIR@/resolvconf -l}
if [ "${resolv_conf_head-x}" = x -a -f "$SYSCONFDIR"/resolv.conf.head ]; then
resolv_conf_head="$(cat "${SYSCONFDIR}"/resolv.conf.head)"
fi
@@ -130,12 +130,12 @@
newconf="$(cat "$newest")$NL"
;;
*)
- [ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
- newsearch="$(uniqify $search_domains $SEARCH $search_domains_append)"
+ [ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)"
+ newsearch="$(uniqify $prepend_search $SEARCH)"
NS="$LOCALNAMESERVERS $NAMESERVERS"
newns=
gotlocal=false
- for n in $(uniqify $name_servers $NS $name_servers_append); do
+ for n in $(uniqify $prepend_nameservers $NS); do
add=true
case "$n" in
127.*|0.0.0.0|255.255.255.255|::1) gotlocal=true;;
diff -r 64e4db5838f0 -r be473520b331 external/bsd/openresolv/dist/named.in
--- a/external/bsd/openresolv/dist/named.in Tue Jun 04 09:37:21 2013 +0000
+++ b/external/bsd/openresolv/dist/named.in Fri Jul 12 16:50:27 2013 +0000
@@ -29,7 +29,7 @@
[ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0
. "@SYSCONFDIR@/resolvconf.conf" || exit 1
[ -z "$named_zones" -a -z "$named_options" ] && exit 0
-[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
+[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)"
NL="
"
@@ -78,7 +78,7 @@
if type config_mkdirs >/dev/null 2>&1; then
config_mkdirs "$named_options" "$named_zones"
else
- @PREFIX@/sbin/resolvconf -D "$named_options" "$named_zones"
+ @SBINDIR@/resolvconf -D "$named_options" "$named_zones"
fi
# No point in changing files or reloading bind if the end result has not
diff -r 64e4db5838f0 -r be473520b331 external/bsd/openresolv/dist/pdnsd.in
--- a/external/bsd/openresolv/dist/pdnsd.in Tue Jun 04 09:37:21 2013 +0000
+++ b/external/bsd/openresolv/dist/pdnsd.in Fri Jul 12 16:50:27 2013 +0000
@@ -29,7 +29,7 @@
[ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0
. "@SYSCONFDIR@/resolvconf.conf" || exit 1
[ -z "$pdnsd_conf" -a -z "$pdnsd_resolv" ] && exit 0
-[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
+[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)"
NL="
"
@@ -89,7 +89,7 @@
if type config_mkdirs >/dev/null 2>&1; then
config_mkdirs "$pdnsd_resolv" "$pdnsd_conf"
else
- @PREFIX@/sbin/resolvconf -D "$pdnsd_resolv" "$pdnsd_conf"
+ @SBINDIR@/resolvconf -D "$pdnsd_resolv" "$pdnsd_conf"
fi
if [ -n "$pdnsd_resolv" ]; then
diff -r 64e4db5838f0 -r be473520b331 external/bsd/openresolv/dist/resolvconf.in
--- a/external/bsd/openresolv/dist/resolvconf.in Tue Jun 04 09:37:21 2013 +0000
+++ b/external/bsd/openresolv/dist/resolvconf.in Fri Jul 12 16:50:27 2013 +0000
@@ -30,7 +30,7 @@
VARDIR=@VARDIR@
# Disregard dhcpcd setting
-unset interface_order
+unset interface_order state_dir
# Support original resolvconf configuration layout
# as well as the openresolv config file
@@ -115,18 +115,6 @@
local line= ns= ds= search= d= n= newns=
local new=true iface= private=false p= domain=
- echo "DOMAIN="
- echo "DOMAINS="
- echo "SEARCH=\"$search_domains\""
- # let our subscribers know about global nameservers
- for n in $name_servers; do
- case "$n" in
- 127.*|0.0.0.0|255.255.255.255|::1) :;;
- *) newns="$newns${newns:+ }$n";;
- esac
- done
- echo "NAMESERVERS=\"$newns\""
- echo "LOCALNAMESERVERS="
newns=
while read -r line; do
@@ -328,10 +316,48 @@
return $retval
}
+echo_prepend()
+{
+ echo "# Generated by resolvconf"
+ if [ -n "$search_domains" ]; then
+ echo "search $search_domains"
+ fi
+ for n in $name_servers; do
+ echo "nameserver $n"
+ done
+ echo
+}
+
+echo_append()
+{
+ echo "# Generated by resolvconf"
+ if [ -n "$search_domains_append" ]; then
+ echo "search $search_domains_append"
+ fi
+ for n in $name_servers_append; do
+ echo "nameserver $n"
+ done
+ echo
+}
+
make_vars()
{
local newdomains= d= dn= newns= ns=
+
+ # Clear variables
+ DOMAIN=
+ DOMAINS=
+ SEARCH=
+ NAMESERVERS=
+ LOCALNAMESERVERS=
+
+ if [ -n "$name_servers" -o -n "$search_domains" ]; then
+ eval "$(echo_prepend | parse_resolv)"
+ fi
eval "$(list_resolv -l "$@" | parse_resolv)"
+ if [ -n "$name_servers_append" -o -n "$search_domains_append" ]; then
+ eval "$(echo_append | parse_resolv)"
+ fi
# Ensure that we only list each domain once
for d in $DOMAINS; do
diff -r 64e4db5838f0 -r be473520b331 external/bsd/openresolv/dist/unbound.in
--- a/external/bsd/openresolv/dist/unbound.in Tue Jun 04 09:37:21 2013 +0000
+++ b/external/bsd/openresolv/dist/unbound.in Fri Jul 12 16:50:27 2013 +0000
@@ -29,7 +29,7 @@
[ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0
. "@SYSCONFDIR@/resolvconf.conf" || exit 1
[ -z "$unbound_conf" ] && exit 0
-[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
+[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)"
NL="
"
@@ -60,7 +60,7 @@
if type config_mkdirs >/dev/null 2>&1; then
config_mkdirs "$unbound_conf"
else
- @PREFIX@/sbin/resolvconf -D "$unbound_conf"
+ @SBINDIR@/resolvconf -D "$unbound_conf"
fi
if [ ! -f "$unbound_conf" ] || \
Home |
Main Index |
Thread Index |
Old Index