dnsmasq: fix confdir option processing (FS#1572)
authorHans Dedecker <dedeckeh@gmail.com>
Mon, 11 Jun 2018 09:17:52 +0000 (11:17 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 11 Jun 2018 09:41:26 +0000 (11:41 +0200)
Fix condir option processing allowing to use the format
"<directory>[,<file-extension>......]," as documented on the dnsmasq man
page which previously resulted into bogus dir being created.

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

index 7fa61ad04f6d87c203c61938b95ea258653db2ca..bb68a67296f3939dec1fa052cc1b945c5a00cd2e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
 PKG_VERSION:=2.80test2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq/test-releases
index 2c71a777c33bec788650a666a1da2fb2b6fa1cfb..4906df9ce432781b930a735cd3ad4cad7748c0a8 100644 (file)
@@ -941,8 +941,9 @@ dnsmasq_start()
        xappend "--addn-hosts=$(dirname $HOSTFILE)"
 
        config_get dnsmasqconfdir "$cfg" confdir "/tmp/dnsmasq.d"
-       [ ! -d "$dnsmasqconfdir" ] && mkdir -p $dnsmasqconfdir
        xappend "--conf-dir=$dnsmasqconfdir"
+       dnsmasqconfdir="${dnsmasqconfdir%%,*}"
+       [ ! -d "$dnsmasqconfdir" ] && mkdir -p $dnsmasqconfdir
        xappend "--user=dnsmasq"
        xappend "--group=dnsmasq"
        echo >> $CONFIGFILE_TMP