aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorEmerson Pinter <dev@pinter.com.br>2017-11-15 17:20:44 -0200
committerHans Dedecker <dedeckeh@gmail.com>2017-11-19 22:27:49 +0100
commitbc50a97dfc9f6bf3c1c9d0abc56d8ae56b5d48a1 (patch)
tree300b42f207e5f3005216604a052d87649b702032 /package/network
parentbd1ee909d081adc56931977248f413c670b74388 (diff)
downloadupstream-bc50a97dfc9f6bf3c1c9d0abc56d8ae56b5d48a1.tar.gz
upstream-bc50a97dfc9f6bf3c1c9d0abc56d8ae56b5d48a1.tar.bz2
upstream-bc50a97dfc9f6bf3c1c9d0abc56d8ae56b5d48a1.zip
dnsmasq: load instance-specific conf-file if exists
Without this change, the instance-specific conf-file is being added to procd_add_jail_mount, but not used by dnsmasq. Signed-off-by: Emerson Pinter <dev@pinter.com.br>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/dnsmasq/Makefile2
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init14
2 files changed, 8 insertions, 8 deletions
diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile
index eb87539fae..ad118c6626 100644
--- a/package/network/services/dnsmasq/Makefile
+++ b/package/network/services/dnsmasq/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmasq
PKG_VERSION:=2.78
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq/
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 3d3d83334e..88c2ce6ebf 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -759,9 +759,14 @@ dnsmasq_start()
echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE_TMP
echo "# auto-generated config file from /etc/config/dhcp" > $HOSTFILE
+ local dnsmasqconffile="/etc/dnsmasq.${cfg}.conf"
+ if [ ! -r "$dnsmasqconffile" ]; then
+ dnsmasqconffile=/etc/dnsmasq.conf
+ fi
+
# if we did this last, we could override auto-generated config
- [ -f /etc/dnsmasq.conf ] && {
- xappend "--conf-file=/etc/dnsmasq.conf"
+ [ -f "${dnsmasqconffile}" ] && {
+ xappend "--conf-file=${dnsmasqconffile}"
}
$PROG --version | grep -osqE "^Compile time options:.* DHCPv6( |$)" && DHCPv6CAPABLE=1 || DHCPv6CAPABLE=0
@@ -1017,11 +1022,6 @@ dnsmasq_start()
[ -n "$user_dhcpscript" ] && procd_set_param env USER_DHCPSCRIPT="$user_dhcpscript"
procd_set_param respawn
- local dnsmasqconffile="/etc/dnsmasq.${cfg}.conf"
- if [ ! -r "$dnsmasqconffile" ]; then
- dnsmasqconffile=/etc/dnsmasq.conf
- fi
-
procd_add_jail dnsmasq ubus log
procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvfile $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT
procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile