aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-08-07 00:52:59 -0700
committerGitHub <noreply@github.com>2020-08-07 00:52:59 -0700
commit7d2f49239d2785d0eadf863a58b4ed64c6a91708 (patch)
tree23233862010102e2ef8bc74bb380f0f618ba2d35 /net
parent65c66ddd71f29b716fdc96c41528d2fccc0c470f (diff)
parentf8ba0fe7bf2f79d3d17c800e2ff4340250d5012d (diff)
Merge pull request #13045 from EricLuehrsen/unbound_20200806
unbound: follow resolv.conf.auto to new location
Diffstat (limited to 'net')
-rw-r--r--net/unbound/Makefile2
-rw-r--r--net/unbound/files/defaults.sh10
-rw-r--r--net/unbound/files/stopping.sh6
-rw-r--r--net/unbound/files/unbound.sh8
4 files changed, 16 insertions, 10 deletions
diff --git a/net/unbound/Makefile b/net/unbound/Makefile
index fb773bdd0..f4f1cbae8 100644
--- a/net/unbound/Makefile
+++ b/net/unbound/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=unbound
PKG_VERSION:=1.11.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://nlnetlabs.nl/downloads/unbound
diff --git a/net/unbound/files/defaults.sh b/net/unbound/files/defaults.sh
index c26511941..785631e3d 100644
--- a/net/unbound/files/defaults.sh
+++ b/net/unbound/files/defaults.sh
@@ -20,17 +20,23 @@ UB_VARDIR=/var/lib/unbound
UB_PIDFILE=/var/run/unbound.pid
# conf deconstructed
-UB_TOTAL_CONF=$UB_VARDIR/unbound.conf
UB_CORE_CONF=$UB_VARDIR/server.conf.tmp
UB_HOST_CONF=$UB_VARDIR/host.conf.tmp
-UB_DHCP_CONF=$UB_VARDIR/dhcp.conf
UB_ZONE_CONF=$UB_VARDIR/zone.conf.tmp
UB_CTRL_CONF=$UB_VARDIR/ctrl.conf.tmp
UB_SRVMASQ_CONF=$UB_VARDIR/dnsmasq_srv.conf.tmp
UB_EXTMASQ_CONF=$UB_VARDIR/dnsmasq_ext.conf.tmp
+
+# conf as found
+UB_TOTAL_CONF=$UB_VARDIR/unbound.conf
+UB_DHCP_CONF=$UB_VARDIR/dhcp.conf
UB_SRV_CONF=$UB_VARDIR/unbound_srv.conf
UB_EXT_CONF=$UB_VARDIR/unbound_ext.conf
+# resolver file complex
+UB_RESOLV_CONF=/tmp/resolv.conf
+UB_RESOLV_AUTO=/tmp/resolv.conf.d/resolv.conf.auto
+
# TLS keys
UB_TLS_KEY_FILE="TLS server UCI not implemented"
UB_TLS_PEM_FILE="TLS server UCI not implemented"
diff --git a/net/unbound/files/stopping.sh b/net/unbound/files/stopping.sh
index 826a40ac6..c3f27ecac 100644
--- a/net/unbound/files/stopping.sh
+++ b/net/unbound/files/stopping.sh
@@ -106,11 +106,11 @@ rootkey_update() {
##############################################################################
resolv_teardown() {
- case $( cat /tmp/resolv.conf ) in
+ case $( cat $UB_RESOLV_CONF ) in
*"generated by Unbound UCI"*)
# our resolver file, reset to auto resolver file.
- rm -f /tmp/resolv.conf
- ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ rm -f $UB_RESOLV_CONF
+ ln -s $UB_RESOLV_AUTO $UB_RESOLV_CONF
;;
esac
}
diff --git a/net/unbound/files/unbound.sh b/net/unbound/files/unbound.sh
index 788aa5dd9..0e2ebaf4d 100644
--- a/net/unbound/files/unbound.sh
+++ b/net/unbound/files/unbound.sh
@@ -161,7 +161,7 @@ bundle_wan_networks() {
##############################################################################
bundle_resolv_conf_servers() {
- local resolvers=$( awk '/nameserver/ { print $2 }' /tmp/resolv.conf.auto )
+ local resolvers=$( awk '/nameserver/ { print $2 }' $UB_RESOLV_AUTO )
UB_LIST_ZONE_SERVERS="$UB_LIST_ZONE_SERVERS $resolvers"
}
@@ -1527,14 +1527,14 @@ resolv_setup() {
else
# unbound listens on 127.0.0.1#53 so set resolver file to local.
- rm -f /tmp/resolv.conf
+ rm -f $UB_RESOLV_CONF
{
- echo "# /tmp/resolv.conf generated by Unbound UCI $( date -Is )"
+ echo "# $UB_RESOLV_CONF generated by Unbound UCI $( date -Is )"
echo "nameserver 127.0.0.1"
echo "nameserver ::1"
echo "search $UB_TXT_DOMAIN."
- } > /tmp/resolv.conf
+ } > $UB_RESOLV_CONF
fi
}