svn commit: r312971 - vendor/openresolv/3.9.0
Pedro F. Giffuni
pfg at FreeBSD.org
Sun Jan 29 22:38:15 UTC 2017
Author: pfg
Date: Sun Jan 29 22:38:13 2017
New Revision: 312971
URL: https://svnweb.freebsd.org/changeset/base/312971
Log:
Tag openresolv 3.9.0.
Obtained from: http://roy.marples.name/projects/openresolv
Added:
vendor/openresolv/3.9.0/
- copied from r312966, vendor/openresolv/dist/
Replaced:
vendor/openresolv/3.9.0/Makefile
- copied unchanged from r312970, vendor/openresolv/dist/Makefile
vendor/openresolv/3.9.0/configure
- copied unchanged from r312970, vendor/openresolv/dist/configure
vendor/openresolv/3.9.0/libc.in
- copied unchanged from r312970, vendor/openresolv/dist/libc.in
vendor/openresolv/3.9.0/pdns_recursor.in
- copied unchanged from r312970, vendor/openresolv/dist/pdns_recursor.in
vendor/openresolv/3.9.0/resolvconf.8.in
- copied unchanged from r312970, vendor/openresolv/dist/resolvconf.8.in
vendor/openresolv/3.9.0/resolvconf.conf.5.in
- copied unchanged from r312970, vendor/openresolv/dist/resolvconf.conf.5.in
vendor/openresolv/3.9.0/resolvconf.in
- copied unchanged from r312970, vendor/openresolv/dist/resolvconf.in
Copied: vendor/openresolv/3.9.0/Makefile (from r312970, vendor/openresolv/dist/Makefile)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ vendor/openresolv/3.9.0/Makefile Sun Jan 29 22:38:13 2017 (r312971, copy of r312970, vendor/openresolv/dist/Makefile)
@@ -0,0 +1,98 @@
+PKG= openresolv
+
+# Nasty hack so that make clean works without configure being run
+_CONFIG_MK!= test -e config.mk && echo config.mk || echo config-null.mk
+CONFIG_MK?= ${_CONFIG_MK}
+include ${CONFIG_MK}
+
+SBINDIR?= /sbin
+SYSCONFDIR?= /etc
+LIBEXECDIR?= /libexec/resolvconf
+VARDIR?= /var/run/resolvconf
+
+INSTALL?= install
+SED?= sed
+
+VERSION!= ${SED} -n 's/OPENRESOLV_VERSION="\(.*\)".*/\1/p' resolvconf.in
+
+BINMODE?= 0755
+DOCMODE?= 0644
+MANMODE?= 0444
+
+RESOLVCONF= resolvconf resolvconf.8 resolvconf.conf.5
+SUBSCRIBERS= libc dnsmasq named pdnsd unbound
+TARGET= ${RESOLVCONF} ${SUBSCRIBERS}
+SRCS= ${TARGET:C,$,.in,} # pmake
+SRCS:= ${TARGET:=.in} # gmake
+
+SED_SBINDIR= -e 's:@SBINDIR@:${SBINDIR}:g'
+SED_SYSCONFDIR= -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g'
+SED_LIBEXECDIR= -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g'
+SED_VARDIR= -e 's:@VARDIR@:${VARDIR}:g'
+SED_RCDIR= -e 's:@RCDIR@:${RCDIR}:g'
+SED_RESTARTCMD= -e 's:@RESTARTCMD@:${RESTARTCMD}:g'
+SED_RCDIR= -e 's:@RCDIR@:${RCDIR}:g'
+SED_STATUSARG= -e 's:@STATUSARG@:${STATUSARG}:g'
+
+DISTPREFIX?= ${PKG}-${VERSION}
+DISTFILEGZ?= ${DISTPREFIX}.tar.gz
+DISTFILE?= ${DISTPREFIX}.tar.xz
+DISTINFO= ${DISTFILE}.distinfo
+DISTINFOSIGN= ${DISTINFO}.asc
+CKSUM?= cksum -a SHA256
+PGP?= netpgp
+
+FOSSILID?= current
+
+.SUFFIXES: .in
+
+all: ${TARGET}
+
+.in: Makefile ${CONFIG_MK}
+ ${SED} ${SED_SBINDIR} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \
+ ${SED_VARDIR} \
+ ${SED_RCDIR} ${SED_RESTARTCMD} ${SED_RCDIR} ${SED_STATUSARG} \
+ $< > $@
+
+clean:
+ rm -f ${TARGET}
+
+distclean: clean
+ rm -f config.mk ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN}
+
+installdirs:
+
+proginstall: ${TARGET}
+ ${INSTALL} -d ${DESTDIR}${SBINDIR}
+ ${INSTALL} -m ${BINMODE} resolvconf ${DESTDIR}${SBINDIR}
+ ${INSTALL} -d ${DESTDIR}${SYSCONFDIR}
+ test -e ${DESTDIR}${SYSCONFDIR}/resolvconf.conf || \
+ ${INSTALL} -m ${DOCMODE} resolvconf.conf ${DESTDIR}${SYSCONFDIR}
+ ${INSTALL} -d ${DESTDIR}${LIBEXECDIR}
+ ${INSTALL} -m ${DOCMODE} ${SUBSCRIBERS} ${DESTDIR}${LIBEXECDIR}
+
+maninstall:
+ ${INSTALL} -d ${DESTDIR}${MANDIR}/man8
+ ${INSTALL} -m ${MANMODE} resolvconf.8 ${DESTDIR}${MANDIR}/man8
+ ${INSTALL} -d ${DESTDIR}${MANDIR}/man5
+ ${INSTALL} -m ${MANMODE} resolvconf.conf.5 ${DESTDIR}${MANDIR}/man5
+
+install: proginstall maninstall
+
+import:
+ rm -rf /tmp/${DISTPREFIX}
+ ${INSTALL} -d /tmp/${DISTPREFIX}
+ cp README ${SRCS} /tmp/${DISTPREFIX}
+
+dist:
+ fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ}
+ gunzip -c ${DISTFILEGZ} | xz >${DISTFILE}
+ rm ${DISTFILEGZ}
+
+distinfo: dist
+ rm -f ${DISTINFO} ${DISTINFOSIGN}
+ ${CKSUM} ${DISTFILE} >${DISTINFO}
+ #printf "SIZE (${DISTFILE}) = %s\n" $$(wc -c <${DISTFILE}) >>${DISTINFO}
+ ${PGP} --clearsign --output=${DISTINFOSIGN} ${DISTINFO}
+ chmod 644 ${DISTINFOSIGN}
+ ls -l ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN}
Copied: vendor/openresolv/3.9.0/configure (from r312970, vendor/openresolv/dist/configure)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ vendor/openresolv/3.9.0/configure Sun Jan 29 22:38:13 2017 (r312971, copy of r312970, vendor/openresolv/dist/configure)
@@ -0,0 +1,159 @@
+#!/bin/sh
+# Try and be like autotools configure, but without autotools
+
+# Ensure that we do not inherit these from env
+OS=
+BUILD=
+HOST=
+TARGET=
+RESTARTCMD=
+RCDIR=
+STATUSARG=
+
+for x do
+ opt=${x%%=*}
+ var=${x#*=}
+ case "$opt" in
+ --os|OS) OS=$var;;
+ --with-cc|CC) CC=$var;;
+ --debug) DEBUG=$var;;
+ --disable-debug) DEBUG=no;;
+ --enable-debug) DEBUG=yes;;
+ --prefix) PREFIX=$var;;
+ --sysconfdir) SYSCONFDIR=$var;;
+ --bindir|--sbindir) SBINDIR=$var;;
+ --libexecdir) LIBEXECDIR=$var;;
+ --statedir|--localstatedir) STATEDIR=$var;;
+ --dbdir) DBDIR=$var;;
+ --rundir) RUNDIR=$var;;
+ --mandir) MANDIR=$var;;
+ --with-ccopts|CFLAGS) CFLAGS=$var;;
+ CPPFLAGS) CPPFLAGS=$var;;
+ --build) BUILD=$var;;
+ --host) HOST=$var;;
+ --target) TARGET=$var;;
+ --libdir) LIBDIR=$var;;
+ --restartcmd) RESTARTCMD=$var;;
+ --rcdir) RCDIR=$var;;
+ --statusarg) STATUSARG=$var;;
+ --includedir) eval INCLUDEDIR="$INCLUDEDIR${INCLUDEDIR:+ }$var";;
+ --datadir|--infodir) ;; # ignore autotools
+ --disable-maintainer-mode|--disable-dependency-tracking) ;;
+ --help) echo "See the README file for available options"; exit 0;;
+ *) echo "$0: WARNING: unknown option $opt" >&2;;
+ esac
+done
+
+if [ -z "$LIBEXECDIR" ]; then
+ printf "Checking for directory /libexec ... "
+ if [ -d /libexec ]; then
+ echo "yes"
+ LIBEXECDIR=$PREFIX/libexec/resolvconf
+ else
+ echo "no"
+ LIBEXECDIR=$PREFIX/lib/resolvconf
+ fi
+fi
+if [ -z "$RUNDIR" ]; then
+ printf "Checking for directory /run ... "
+ if [ -d /run ]; then
+ echo "yes"
+ RUNDIR=/run
+ else
+ echo "no"
+ RUNDIR=/var/run
+ fi
+fi
+
+: ${SED:=sed}
+
+: ${SYSCONFDIR:=$PREFIX/etc}
+: ${SBINDIR:=$PREFIX/sbin}
+: ${LIBEXECDIR:=$PREFIX/libexec/resolvconf}
+: ${STATEDIR:=/var}
+: ${RUNDIR:=$STATEDIR/run}
+: ${MANDIR:=${PREFIX:-/usr}/share/man}
+
+eval SYSCONFDIR="$SYSCONFDIR"
+eval SBINDIR="$SBINDIR"
+eval LIBEXECDIR="$LIBEXECDIR"
+eval VARDIR="$RUNDIR/resolvconf"
+eval MANDIR="$MANDIR"
+
+CONFIG_MK=config.mk
+
+if [ -z "$BUILD" ]; then
+ # autoconf target triplet: cpu-vendor-os
+ BUILD=$(uname -m)-unknown-$(uname -s | tr '[:upper:]' '[:lower:]')
+fi
+: ${HOST:=$BUILD}
+
+if [ -z "$OS" ]; then
+ echo "Deriving operating system from ... $HOST"
+ # Derive OS from cpu-vendor-[kernel-]os
+ CPU=${HOST%%-*}
+ REST=${HOST#*-}
+ if [ "$CPU" != "$REST" ]; then
+ VENDOR=${REST%%-*}
+ REST=${REST#*-}
+ if [ "$VENDOR" != "$REST" ]; then
+ # Use kernel if given, otherwise os
+ OS=${REST%%-*}
+ else
+ # 2 tupple
+ OS=$VENDOR
+ VENDOR=
+ fi
+ fi
+
+ # Work with cpu-kernel-os, ie Debian
+ case "$VENDOR" in
+ linux*|kfreebsd*) OS=$VENDOR; VENDOR= ;;
+ esac
+ # Special case
+ case "$OS" in
+ gnu*) OS=hurd;; # No HURD support as yet
+ esac
+fi
+
+echo "Configuring openresolv for ... $OS"
+rm -rf $CONFIG_MK
+echo "# $OS" >$CONFIG_MK
+
+case "$OS" in
+freebsd*)
+ # On FreeBSD, /etc/init.d/foo status returns 0 if foo is not enabled
+ # regardless of if it's not running.
+ # So we force onestatus to work around this silly bug.
+ if [ -z "$STATUSARG" ]; then
+ STATUSARG="onestatus"
+ fi
+ ;;
+linux*)
+ # cksum does't support -a and netpgp is rare
+ echo "CKSUM= sha256sum --tag" >>$CONFIG_MK
+ echo "PGP= gpg2" >>$CONFIG_MK
+ ;;
+esac
+
+for x in SYSCONFDIR SBINDIR LIBEXECDIR VARDIR MANDIR RESTARTCMD RCDIR STATUSARG
+do
+ eval v=\$$x
+ # Make files look nice for import
+ l=$((10 - ${#x}))
+ unset t
+ [ $l -gt 3 ] && t=" "
+ echo "$x=$t $v" >>$CONFIG_MK
+done
+
+echo
+echo " SYSCONFDIR = $SYSCONFDIR"
+echo " SBINDIR = $SBINDIR"
+echo " LIBEXECDIR = $LIBEXECDIR"
+echo " VARDIR = $RUNDIR"
+echo " MANDIR = $MANDIR"
+echo
+echo " RESTARTCMD = $RESTARTCMD"
+echo " RCDIR = $RCDIR"
+echo " STATUSARG = $STATUSARG"
+echo
Copied: vendor/openresolv/3.9.0/libc.in (from r312970, vendor/openresolv/dist/libc.in)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ vendor/openresolv/3.9.0/libc.in Sun Jan 29 22:38:13 2017 (r312971, copy of r312970, vendor/openresolv/dist/libc.in)
@@ -0,0 +1,252 @@
+#!/bin/sh
+# Copyright (c) 2007-2016 Roy Marples
+# All rights reserved
+
+# libc subscriber for resolvconf
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+SYSCONFDIR=@SYSCONFDIR@
+LIBEXECDIR=@LIBEXECDIR@
+VARDIR=@VARDIR@
+IFACEDIR="$VARDIR/interfaces"
+NL="
+"
+
+# sed may not be available, and this is faster on small files
+key_get_value()
+{
+ local key="$1" x= line=
+
+ shift
+ if [ $# -eq 0 ]; then
+ while read -r line; do
+ case "$line" in
+ "$key"*) echo "${line##$key}";;
+ esac
+ done
+ else
+ for x do
+ while read -r line; do
+ case "$line" in
+ "$key"*) echo "${line##$key}";;
+ esac
+ done < "$x"
+ done
+ fi
+}
+
+keys_remove()
+{
+ local key x line found
+
+ while read -r line; do
+ found=false
+ for key do
+ case "$line" in
+ "$key"*|"#"*|" "*|" "*|"") found=true;;
+ esac
+ $found && break
+ done
+ $found || echo "$line"
+ done
+}
+
+local_nameservers="127.* 0.0.0.0 255.255.255.255 ::1"
+
+# Support original resolvconf configuration layout
+# as well as the openresolv config file
+if [ -f "$SYSCONFDIR"/resolvconf.conf ]; then
+ . "$SYSCONFDIR"/resolvconf.conf
+elif [ -d "$SYSCONFDIR"/resolvconf ]; then
+ SYSCONFDIR="$SYSCONFDIR/resolvconf/resolv.conf.d"
+ base="$SYSCONFDIR/resolv.conf.d/base"
+ if [ -f "$base" ]; then
+ prepend_nameservers="$(key_get_value "nameserver " "$base")"
+ domain="$(key_get_value "domain " "$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
+ if [ -f "$SYSCONFDIR"/resolv.conf.d/head ]; then
+ resolv_conf_head="$(cat "${SYSCONFDIR}"/resolv.conf.d/head)"
+ fi
+ if [ -f "$SYSCONFDIR"/resolv.conf.d/tail ]; then
+ resolv_conf_tail="$(cat "$SYSCONFDIR"/resolv.conf.d/tail)"
+ fi
+fi
+: ${resolv_conf:=/etc/resolv.conf}
+: ${libc_service:=nscd}
+: ${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
+if [ "${resolv_conf_tail-x}" = x -a -f "$SYSCONFDIR"/resolv.conf.tail ]; then
+ resolv_conf_tail="$(cat "$SYSCONFDIR"/resolv.conf.tail)"
+fi
+
+backup=true
+signature="# Generated by resolvconf"
+
+uniqify()
+{
+ local result=
+ while [ -n "$1" ]; do
+ case " $result " in
+ *" $1 "*);;
+ *) result="$result $1";;
+ esac
+ shift
+ done
+ echo "${result# *}"
+}
+
+case "${resolv_conf_passthrough:-NO}" in
+[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
+ backup=false
+ newest=
+ for conf in "$IFACEDIR"/*; do
+ if [ -z "$newest" -o "$conf" -nt "$newest" ]; then
+ newest="$conf"
+ fi
+ done
+ [ -z "$newest" ] && exit 0
+ newconf="$(cat "$newest")$NL"
+ ;;
+/dev/null|[Nn][Uu][Ll][Ll])
+ : ${resolv_conf_local_only:=NO}
+ if [ "$local_nameservers" = "127.* 0.0.0.0 255.255.255.255 ::1" ]; then
+ local_nameservers=
+ fi
+ # Need to overwrite our variables.
+ eval "$(@SBINDIR@/resolvconf -V)"
+ ;;
+
+*)
+ [ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)"
+ ;;
+esac
+case "${resolv_conf_passthrough:-NO}" in
+[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) ;;
+*)
+ : ${domain:=$DOMAIN}
+ newsearch="$(uniqify $prepend_search $SEARCH $append_search)"
+ NS="$LOCALNAMESERVERS $NAMESERVERS"
+ newns=
+ gotlocal=false
+ for n in $(uniqify $prepend_nameservers $NS $append_nameservers); do
+ add=true
+ islocal=false
+ for l in $local_nameservers; do
+ case "$n" in
+ $l) islocal=true; gotlocal=true; break;;
+ esac
+ done
+ if ! $islocal; then
+ case "${resolv_conf_local_only:-YES}" in
+ [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
+ $gotlocal && add=false;;
+ esac
+ fi
+ $add && newns="$newns $n"
+ done
+
+ # Hold our new resolv.conf in a variable to save on temporary files
+ newconf="$signature$NL"
+ if [ -n "$resolv_conf_head" ]; then
+ newconf="$newconf$resolv_conf_head$NL"
+ fi
+
+ [ -n "$domain" ] && newconf="${newconf}domain $domain$NL"
+ if [ -n "$newsearch" -a "$newsearch" != "$domain" ]; then
+ newconf="${newconf}search $newsearch$NL"
+ fi
+ for n in $newns; do
+ newconf="${newconf}nameserver $n$NL"
+ done
+
+ # Now add anything we don't care about such as sortlist and options
+ stuff="$($list_resolv | keys_remove nameserver domain search)"
+ if [ -n "$stuff" ]; then
+ newconf="$newconf$stuff$NL"
+ fi
+
+ # Append any user defined ones
+ if [ -n "$resolv_conf_options" ]; then
+ newconf="${newconf}options $resolv_conf_options$NL"
+ fi
+ if [ -n "$resolv_conf_sortlist" ]; then
+ newconf="${newconf}sortlist $resolv_conf_sortlist$NL"
+ fi
+
+ if [ -n "$resolv_conf_tail" ]; then
+ newconf="$newconf$resolv_conf_tail$NL"
+ fi
+ ;;
+esac
+
+# Check if the file has actually changed or not
+if [ -e "$resolv_conf" ]; then
+ [ "$(cat "$resolv_conf")" = "$(printf %s "$newconf")" ] && exit 0
+fi
+
+# Change is good.
+# If the old file does not have our signature, back it up.
+# If the new file just has our signature, restore the backup.
+if $backup; then
+ if [ "$newconf" = "$signature$NL" ]; then
+ if [ -e "$resolv_conf.bak" ]; then
+ newconf="$(cat "$resolv_conf.bak")$NL"
+ fi
+ elif [ -e "$resolv_conf" ]; then
+ read line <"$resolv_conf"
+ if [ "$line" != "$signature" ]; then
+ cp "$resolv_conf" "$resolv_conf.bak"
+ fi
+ fi
+fi
+
+# Create our resolv.conf now
+(umask 022; printf %s "$newconf" >"$resolv_conf")
+if [ -n "$libc_restart" ]; then
+ eval $libc_restart
+elif [ -n "$RESTARTCMD" ]; then
+ set -- ${libc_service}
+ eval $RESTARTCMD
+else
+ @SBINDIR@/resolvconf -r ${libc_service}
+fi
+
+retval=0
+# Notify users of the resolver
+for script in "$LIBEXECDIR"/libc.d/*; do
+ if [ -f "$script" ]; then
+ if [ -x "$script" ]; then
+ "$script" "$@"
+ else
+ (. "$script")
+ fi
+ retval=$(($retval + $?))
+ fi
+done
+exit $retval
Copied: vendor/openresolv/3.9.0/pdns_recursor.in (from r312970, vendor/openresolv/dist/pdns_recursor.in)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ vendor/openresolv/3.9.0/pdns_recursor.in Sun Jan 29 22:38:13 2017 (r312971, copy of r312970, vendor/openresolv/dist/pdns_recursor.in)
@@ -0,0 +1,78 @@
+#!/bin/sh
+# Copyright (c) 2009-2011 Roy Marples
+# All rights reserved
+
+# PowerDNS Recursor subscriber for resolvconf
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+[ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0
+. "@SYSCONFDIR@/resolvconf.conf" || exit 1
+[ -z "$pdns_zones" ] && exit 0
+[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)"
+NL="
+"
+
+: ${pdns_service:=pdns_recursor}
+
+newzones=
+
+# pds_recursor does not present support global forward servers, which
+# does limit it's usefulness somewhat.
+# If it did, the below code can be enabled, or something like it.
+#for n in $NAMESERVERS; do
+# newzones="$newzones${newzones:+,}$n"
+#done
+#[ -n "$newzones" ] && newzones=".=$newzones$NL"
+
+for d in $DOMAINS; do
+ newns=
+ ns="${d#*:}"
+ while [ -n "$ns" ]; do
+ newns="$newns${newns:+,}${ns%%,*}"
+ [ "$ns" = "${ns#*,}" ] && break
+ ns="${ns#*,}"
+ done
+ [ -n "$newns" ] && newzones="$newzones${d%%:*}=$newns$NL"
+done
+
+# Try to ensure that config dirs exist
+if type config_mkdirs >/dev/null 2>&1; then
+ config_mkdirs "$pdnsd_zones"
+else
+ @SBINDIR@/resolvconf -D "$pdnsd_zones"
+fi
+
+if [ ! -f "$pdns_zones" ] || \
+ [ "$(cat "$pdns_zones")" != "$(printf %s "$newzones")" ]
+then
+ printf %s "$newzones" >"$pdns_zones"
+ if [ -n "$pdns_restart" ]; then
+ eval $pdns_restart
+ elif [ -n "$RESTARTCMD" ]; then
+ set -- ${pdns_service}
+ eval $RESTARTCMD
+ else
+ @SBINDIR@/resolvconf -r ${pdns_service}
+ fi
+fi
Copied: vendor/openresolv/3.9.0/resolvconf.8.in (from r312970, vendor/openresolv/dist/resolvconf.8.in)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ vendor/openresolv/3.9.0/resolvconf.8.in Sun Jan 29 22:38:13 2017 (r312971, copy of r312970, vendor/openresolv/dist/resolvconf.8.in)
@@ -0,0 +1,323 @@
+.\" Copyright (c) 2007-2016 Roy Marples
+.\" All rights reserved
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd November 29, 2016
+.Dt RESOLVCONF 8
+.Os
+.Sh NAME
+.Nm resolvconf
+.Nd a framework for managing multiple DNS configurations
+.Sh SYNOPSIS
+.Nm
+.Fl I
+.Nm
+.Op Fl m Ar metric
+.Op Fl p
+.Op Fl x
+.Fl a Ar interface Ns Op Ar .protocol
+.No < Ns Pa file
+.Nm
+.Op Fl f
+.Fl d Ar interface Ns Op Ar .protocol
+.Nm
+.Op Fl x
+.Fl il Ar pattern
+.Nm
+.Fl u
+.Nm
+.Fl Fl version
+.Sh DESCRIPTION
+.Nm
+manages
+.Xr resolv.conf 5
+files from multiple sources, such as DHCP and VPN clients.
+Traditionally, the host runs just one client and that updates
+.Pa /etc/resolv.conf .
+More modern systems frequently have wired and wireless interfaces and there is
+no guarantee both are on the same network.
+With the advent of VPN and other
+types of networking daemons, many things now contend for the contents of
+.Pa /etc/resolv.conf .
+.Pp
+.Nm
+solves this by letting the daemon send their
+.Xr resolv.conf 5
+file to
+.Nm
+via
+.Xr stdin 4
+with the argument
+.Fl a Ar interface Ns Op Ar .protocol
+instead of the filesystem.
+.Nm
+then updates
+.Pa /etc/resolv.conf
+as it thinks best.
+When a local resolver other than libc is installed, such as
+.Xr dnsmasq 8
+or
+.Xr named 8 ,
+then
+.Nm
+will supply files that the resolver should be configured to include.
+.Pp
+.Nm
+assumes it has a job to do.
+In some situations
+.Nm
+needs to act as a deterrent to writing to
+.Pa /etc/resolv.conf .
+Where this file cannot be made immutable or you just need to toggle this
+behaviour,
+.Nm
+can be disabled by adding
+.Sy resolvconf Ns = Ns NO
+to
+.Xr resolvconf.conf 5 .
+.Pp
+.Nm
+can mark an interfaces
+.Pa resolv.conf
+as private.
+This means that the name servers listed in that
+.Pa resolv.conf
+are only used for queries against the domain/search listed in the same file.
+This only works when a local resolver other than libc is installed.
+See
+.Xr resolvconf.conf 5
+for how to configure
+.Nm
+to use a local name server and how to remove the private marking.
+.Pp
+.Nm
+can mark an interfaces
+.Pa resolv.conf
+as exclusive.
+Only the latest exclusive interface is used for processing, otherwise all are.
+.Pp
+When an interface goes down, it should then call
+.Nm
+with
+.Fl d Ar interface.*
+arguments to delete the
+.Pa resolv.conf
+file(s) for all the
+.Ar protocols
+on the
+.Ar interface .
+.Pp
+Here are some options for the above commands:-
+.Bl -tag -width pattern_opt
+.It Fl f
+Ignore non existent interfaces.
+Only really useful for deleting interfaces.
+.It Fl m Ar metric
+Set the metric of the interface when adding it, default of 0.
+Lower metrics take precedence.
+This affects the default order of interfaces when listed.
+.It Fl p
+Marks the interface
+.Pa resolv.conf
+as private.
+.It Fl x
+Mark the interface
+.Pa resolv.conf
+as exclusive when adding, otherwise only use the latest exclusive interface.
+.El
+.Pp
+.Nm
+has some more commands for general usage:-
+.Bl -tag -width pattern_opt
+.It Fl i Ar pattern
+List the interfaces and protocols, optionally matching
+.Ar pattern ,
+we have
+.Pa resolv.conf
+files for.
+.It Fl l Ar pattern
+List the
+.Pa resolv.conf
+files we have.
+If
+.Ar pattern
+is specified then we list the files for the interfaces and protocols
+that match it.
+.It Fl u
+Force
+.Nm
+to update all its subscribers.
+.Nm
+does not update the subscribers when adding a resolv.conf that matches
+what it already has for that interface.
+.It Fl Fl version
+Echo the resolvconf version to
+.Em stdout .
+.El
+.Pp
+.Nm
+also has some commands designed to be used by it's subscribers and
+system startup:-
+.Bl -tag -width pattern_opt
+.It Fl I
+Initialise the state directory
+.Pa @VARDIR@ .
+This only needs to be called if the initial system boot sequence does not
+automatically clean it out; for example the state directory is moved
+somewhere other than
+.Pa /var/run .
+If used, it should only be called once as early in the system boot sequence
+as possible and before
+.Nm
+is used to add interfaces.
+.It Fl R
+Echo the command used to restart a service.
+.It Fl r Ar service
+If the
+.Ar service
+is running then restart it.
+If the service does not exist or is not running then zero is returned,
+otherwise the result of restarting the service.
+.It Fl v
+Echo variables DOMAINS, SEARCH and NAMESERVERS so that the subscriber can
+configure the resolver easily.
+.It Fl V
+Same as
+.Fl v
+except that only the information configured in
+.Xr resolvconf.conf 5
+is set.
+.El
+.Sh INTERFACE ORDERING
+For
+.Nm
+to work effectively, it has to process the resolv.confs for the interfaces
+in the correct order.
+.Nm
+first processes interfaces from the
+.Sy interface_order
+list, then interfaces without a metic and that match the
+.Sy dynamic_order
+list, then interfaces with a metric in order and finally the rest in
+the operating systems lexical order.
+See
+.Xr resolvconf.conf 5
+for details on these lists.
+.Sh PROTOCOLS
+Here are some suggested protocol tags to use for each
+.Pa resolv.conf
+file registered on an
+.Ar interface Ns No :-
+.Bl -tag -width pattern_opt
+.It dhcp
+Dynamic Host Configuration Protocol.
+Initial versions of
+.Nm
+did not recommend a
+.Ar protocol
+tag be appended to the
+.Ar interface
+name.
+When the protocol is absent, it is assumed to be the DHCP protocol.
+.It ppp
+Point-to-Point Protocol.
+.It ra
+IPv6 Router Advertisement.
+.It dhcp6
+Dynamic Host Configuration Protocol, version 6.
+.El
+.Sh IMPLEMENTATION NOTES
+If a subscriber has the executable bit then it is executed otherwise it is
+assumed to be a shell script and sourced into the current environment in a
+subshell.
+This is done so that subscribers can remain fast, but are also not limited
+to the shell language.
+.Pp
+Portable subscribers should not use anything outside of
+.Pa /bin
+and
+.Pa /sbin
+because
+.Pa /usr
+and others may not be available when booting.
+Also, it would be unwise to assume any shell specific features.
+.Sh ENVIRONMENT
+.Bl -ohang
+.It Va IF_METRIC
+If the
+.Fl m
+option is not present then we use
+.Va IF_METRIC
+for the metric.
+.It Va IF_PRIVATE
+Marks the interface
+.Pa resolv.conf
+as private.
+.It Va IF_EXCLUSIVE
+Marks the interface
+.Pa resolv.conf
+as exclusive.
+.El
+.Sh FILES
+.Bl -ohang
+.It Pa /etc/resolv.conf.bak
+Backup file of the original resolv.conf.
+.It Pa @SYSCONFDIR@/resolvconf.conf
+Configuration file for
+.Nm .
+.It Pa @LIBEXECDIR@
+Directory of subscribers which are run every time
+.Nm
+adds, deletes or updates.
+.It Pa @LIBEXECDIR@/libc.d
+Directory of subscribers which are run after the libc subscriber is run.
+.It Pa @VARDIR@
+State directory for
+.Nm .
+.El
+.Sh SEE ALSO
+.Xr resolver 3 ,
+.Xr stdin 4 ,
+.Xr resolv.conf 5 ,
+.Xr resolvconf.conf 5
+.Sh HISTORY
+This implementation of
+.Nm
+is called openresolv and is fully command line compatible with Debian's
+resolvconf, as written by Thomas Hood.
+.Sh AUTHORS
+.An Roy Marples Aq Mt roy at marples.name
+.Sh BUGS
+Please report them to
+.Lk http://roy.marples.name/projects/openresolv
+.Pp
+.Nm
+does not validate any of the files given to it.
+.Pp
+When running a local resolver other than libc, you will need to configure it
+to include files that
+.Nm
+will generate.
+You should consult
+.Xr resolvconf.conf 5
+for instructions on how to configure your resolver.
Copied: vendor/openresolv/3.9.0/resolvconf.conf.5.in (from r312970, vendor/openresolv/dist/resolvconf.conf.5.in)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ vendor/openresolv/3.9.0/resolvconf.conf.5.in Sun Jan 29 22:38:13 2017 (r312971, copy of r312970, vendor/openresolv/dist/resolvconf.conf.5.in)
@@ -0,0 +1,331 @@
+.\" Copyright (c) 2009-2016 Roy Marples
+.\" All rights reserved
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd December 29, 2016
+.Dt RESOLVCONF.CONF 5
+.Os
+.Sh NAME
+.Nm resolvconf.conf
+.Nd resolvconf configuration file
+.Sh DESCRIPTION
+.Nm
+is the configuration file for
+.Xr resolvconf 8 .
+The
+.Nm
+file is a shell script that is sourced by
+.Xr resolvconf 8 ,
+meaning that
+.Nm
+must contain valid shell commands.
+Listed below are the standard
+.Nm
+variables that may be set.
+If the values contain whitespace, wildcards or other special shell characters,
+ensure they are quoted and escaped correctly.
+See the
+.Sy replace
+variable for an example on quoting.
+.Pp
+After updating this file, you may wish to run
+.Nm resolvconf -u
+to apply the new configuration.
+.Pp
+When a dynamically generated list is appended or prepended to, the whole
+is made unique where left-most wins.
+.Sh RESOLVCONF OPTIONS
+.Bl -tag -width indent
+.It Sy resolvconf
+Set to NO to disable
+.Nm resolvconf
+from running any subscribers.
+Defaults to YES.
+.It Sy interface_order
+These interfaces will always be processed first.
+If unset, defaults to the following:-
+.D1 lo lo[0-9]*
+.It Sy dynamic_order
+These interfaces will be processed next, unless they have a metric.
+If unset, defaults to the following:-
+.D1 tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]*
+.It Sy inclusive_interfaces
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-vendor
mailing list