Option resolvfile should now affect only how dnsmasq itself will run. The implicit effect of its specific value on other parts of the system makes the code unnecessarily hard to follow
Signed-off-by: Yousong Zhou <yszhou4t...@gmail.com> --- package/network/services/dnsmasq/Makefile | 2 +- package/network/services/dnsmasq/files/dnsmasq.init | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index d51f23e48b..5e83b4f8e5 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.80 -PKG_RELEASE:=8 +PKG_RELEASE:=9 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 05c555bd8c..22471c11aa 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -888,7 +888,6 @@ dnsmasq_start() config_get resolvfile "$cfg" resolvfile [ -n "$resolvfile" -a ! -e "$resolvfile" ] && touch "$resolvfile" xappend "--resolv-file=$resolvfile" - [ "$resolvfile" = "/tmp/resolv.conf.auto" ] && localuse=1 fi config_get hostsfile "$cfg" dhcphostsfile @@ -1039,13 +1038,9 @@ dnsmasq_start() dnsmasq_stop() { local cfg="$1" - local noresolv resolvfile localuse + local localuse - config_get_bool noresolv "$cfg" noresolv 0 config_get_bool localuse "$cfg" localuse 0 - config_get resolvfile "$cfg" "resolvfile" - - [ "$noresolv" = 0 -a "$resolvfile" = "/tmp/resolv.conf.auto" ] && localuse=1 [ "$localuse" -gt 0 ] && ln -sf "/tmp/resolv.conf.auto" /tmp/resolv.conf rm -f ${BASEDHCPSTAMPFILE}.${cfg}.*.dhcp _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel