summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2018-06-27 07:18:11 +0300
committerGitHub <noreply@github.com>2018-06-27 07:18:11 +0300
commit2578f56c298ef8691cc9448dc9f583fc8159260e (patch)
tree64216f39d5a46c49866287d0a28659b264a61540
parent338690b2f79e2c7090be4e9adbb19b452c9e3c36 (diff)
parent43f14b81120a79d6d073752508264a410bceadea (diff)
Merge pull request #6350 from EricLuehrsen/unbound_20180625_1701
[lede-17.01] unbound: limit outside script source to init funciton scope
-rw-r--r--net/unbound/Makefile4
-rwxr-xr-xnet/unbound/files/unbound.init9
2 files changed, 6 insertions, 7 deletions
diff --git a/net/unbound/Makefile b/net/unbound/Makefile
index 5adcd867e..c28b2a003 100644
--- a/net/unbound/Makefile
+++ b/net/unbound/Makefile
@@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=unbound
PKG_VERSION:=1.6.8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@hotmail.com>
+PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.unbound.net/downloads
diff --git a/net/unbound/files/unbound.init b/net/unbound/files/unbound.init
index 1edf9ef80..08514cc07 100755
--- a/net/unbound/files/unbound.init
+++ b/net/unbound/files/unbound.init
@@ -16,10 +16,6 @@ PROG=/usr/sbin/unbound
##############################################################################
-. /usr/lib/unbound/unbound.sh
-
-##############################################################################
-
boot() {
UNBOUND_BOOT=1
start "$@"
@@ -34,10 +30,11 @@ start_service() {
fi
# complex UCI work
+ . /usr/lib/unbound/unbound.sh
unbound_start
# standard procd clause
- procd_open_instance
+ procd_open_instance "unbound"
procd_set_param command $PROG -d -c $UNBOUND_CONFFILE
procd_set_param respawn
procd_close_instance
@@ -46,6 +43,8 @@ start_service() {
##############################################################################
stop_service() {
+ # clean up
+ . /usr/lib/unbound/unbound.sh
unbound_stop
# Wait! on restart Unbound may take time writing closure stats to syslog