diff options
author | Emerson Pinter <dev@pinter.com.br> | 2017-11-15 17:20:44 -0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2017-11-20 21:42:10 +0100 |
commit | e626942c3318d4e814857b2f6f2863ccd55a0511 (patch) | |
tree | 36ff4e156bb53fe9e9cb5531d549cfec05c83500 /package/network/services/dnsmasq | |
parent | d64c0e54a564788b9a925c50a4ce5bd5ba16ae02 (diff) | |
download | mtk-20170518-e626942c3318d4e814857b2f6f2863ccd55a0511.zip mtk-20170518-e626942c3318d4e814857b2f6f2863ccd55a0511.tar.gz mtk-20170518-e626942c3318d4e814857b2f6f2863ccd55a0511.tar.bz2 |
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/services/dnsmasq')
-rw-r--r-- | package/network/services/dnsmasq/Makefile | 2 | ||||
-rw-r--r-- | package/network/services/dnsmasq/files/dnsmasq.init | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 8eed542..5888e1e 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 1ecbb3c..34c35c2 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -559,9 +559,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 @@ -775,11 +780,6 @@ dnsmasq_start() procd_set_param file $CONFIGFILE 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 /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvfile $dhcpscript /etc/hosts /etc/ethers $EXTRA_MOUNT procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile |