Only call resolvconf -v when our subcribers don't have any data.
authorRoy Marples <roy@marples.name>
Tue, 21 Apr 2009 12:55:04 +0000 (12:55 +0000)
committerRoy Marples <roy@marples.name>
Tue, 21 Apr 2009 12:55:04 +0000 (12:55 +0000)
This is a good speedup, and still our subscribers to be run by themselves.

dnsmasq.in
libc.in
named.in
pdns_recursor.in
resolvconf.in

index cd646f0b19db3ab38b9476d48c970308efa7fdaa..f10c331327b0878693ecc4adae5e8b8a4b654b9d 100644 (file)
@@ -30,7 +30,7 @@
 . "@SYSCONFDIR@/resolvconf.conf" || exit 1
 [ -z "$dnsmasq_conf" -o -z "$dnsmasq_resolv" ] && exit 0
 : ${RESOLVCONF:=resolvconf}
-eval "$("$RESOLVCONF" -v)"
+[ -z "$NAMESERVERS" -a -z "$DOMAINS" ] && eval "$("$RESOLVCONF" -v)"
 
 dnsmasqpid="${dnsmasq_pid:-/var/run/dnsmasq.pid}"
 newconf="# Generated by resolvconf\n"
diff --git a/libc.in b/libc.in
index 43a16a3d769a0fa01a2de39be40f5e44e76bb914..dcf6e7d41b8966ab7c6b3de461843445fbba91c9 100644 (file)
--- a/libc.in
+++ b/libc.in
@@ -104,7 +104,7 @@ case "${resolv_conf_passthrough:-NO}" in
        newconf="$(cat "$newest")\n"
        ;;
 *)
-       eval "$($RESOLVCONF -v)"
+       [ -z "$NAMESERVERS" -a -z "$SEARCH" ] && eval "$("$RESOLVCONF" -v)"
        newsearch="$(uniqify $search_domains $SEARCH)"
        newns="$(uniqify $name_servers $NAMESERVERS)"
 
index 17e30ab70a8c6598092ffc52b8b481e7be720440..04e0e85d26abd6cde3abff3ff77c998f6eba0b0c 100644 (file)
--- a/named.in
+++ b/named.in
@@ -30,7 +30,7 @@
 . "@SYSCONFDIR@/resolvconf.conf" || exit 1
 [ -z "$named_zones" -o -z "$named_options" ] && exit 0
 : ${RESOLVCONF:=resolvconf}
-eval "$("$RESOLVCONF" -v)"
+[ -z "$NAMESERVERS" -a -z "$DOMAINS" ] && eval "$("$RESOLVCONF" -v)"
 
 newoptions="# Generated by resolvconf\n"
 newzones="$newoptions"
index 5e5f7f40b9a34406530f68a8ba6056691baae0e0..01da8dd9ef0a1d701917242937bafc5f6035e447 100755 (executable)
@@ -30,7 +30,7 @@
 . "@SYSCONFDIR@/resolvconf.conf" || exit 1
 [ -z "$pdns_zones" ] && exit 0
 : ${RESOLVCONF:=resolvconf}
-eval "$("$RESOLVCONF" -v)"
+[ -z "$NAMESERVERS" -a -z "$DOMAINS" ] && eval "$("$RESOLVCONF" -v)"
 
 newzones=
 for n in $NAMESERVERS; do
index 7e23b0cb01401426ae468210bc986ad877dafbe5..8f6bb74f8a0a7336d7d483589afe0079c08f0592 100644 (file)
@@ -416,6 +416,8 @@ if [ "$cmd" = a ]; then
        esac
 fi
 
+eval "$($ARGV0 -v)"
+export DOMAINS SEARCH NAMESERVERS
 retval=0
 for script in "$LIBEXECDIR"/*; do
        [ -f "$script" -a -x "$script" ] || continue