dnsmasq: improve init script portability (FS#1446)
authorHans Dedecker <dedeckeh@gmail.com>
Sat, 24 Mar 2018 17:28:01 +0000 (18:28 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Sat, 24 Mar 2018 17:50:45 +0000 (18:50 +0100)
Improve portability of init script by declaring resolvfile as local
in dnsmasq_stop function.
Fixes resolvfile being set for older busybox versions in dnsmasq_start
in a multi dnsmasq instance config when doing restart; this happens when
the last instance has a resolvfile configured while the first instance
being started has noresolv set to 1.

Base on a patch by "Phil"

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
package/network/services/dnsmasq/Makefile
package/network/services/dnsmasq/files/dnsmasq.init

index 66d66418040a998bceaeece9911517b8460f206d..6a5cad140e46e7208949f98e7751262a4d6f4e3f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
 PKG_VERSION:=2.79
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq/
index dcc18e34d74dade7dec597fec0ad39938368944d..1881b2bcdcc5ae66cac322dc0e00d0a2091bf946 100644 (file)
@@ -1027,7 +1027,7 @@ dnsmasq_start()
 
 dnsmasq_stop()
 {
-       local cfg="$1"
+       local cfg="$1" resolvfile
 
        config_get resolvfile "$cfg" "resolvfile"