diff options
| author | Roy Marples <roy@marples.name> | 2019-09-08 19:01:22 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-09-08 19:01:22 +0100 |
| commit | fc2b16af8a8bd717a2c8ecec6d0fd65616a9bde6 (patch) | |
| tree | 1eaca4e185fbfbe728243dd711a223ba2d174d31 | |
| parent | 2180cc69e8882ba5836e44b18ee40a06654ad992 (diff) | |
| download | openresolv-fc2b16af8a8bd717a2c8ecec6d0fd65616a9bde6.tar.xz | |
pdns_recursor: Fix global forwarders
This actually makes it useful now and is finally included in
the default installation.
| -rw-r--r-- | pdns_recursor.in | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/pdns_recursor.in b/pdns_recursor.in index ad2d922..f3632e0 100644 --- a/pdns_recursor.in +++ b/pdns_recursor.in @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2009-2011 Roy Marples +# Copyright (c) 2009-2019 Roy Marples # All rights reserved # PowerDNS Recursor subscriber for resolvconf @@ -33,17 +33,14 @@ NL=" " -: ${pdns_service:=pdns_recursor} +: ${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 n in $NAMESERVERS; do + newzones="$newzones${newzones:+,}$n" +done +[ -n "$newzones" ] && newzones="+.=$newzones$NL" for d in $DOMAINS; do newns= @@ -71,7 +68,7 @@ then eval $pdns_restart elif [ -n "$RESTARTCMD" ]; then set -- ${pdns_service} - eval $RESTARTCMD + eval "$RESTARTCMD" else @SBINDIR@/resolvconf -r ${pdns_service} fi |
