mirror of https://github.com/hak5/openwrt.git
dnsmasq: fix confdir option processing (FS#1572)
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>openwrt-19.07
parent
83483ba787
commit
8d60f6ee40
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=dnsmasq
|
PKG_NAME:=dnsmasq
|
||||||
PKG_VERSION:=2.80test2
|
PKG_VERSION:=2.80test2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq/test-releases
|
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq/test-releases
|
||||||
|
|
|
@ -941,8 +941,9 @@ dnsmasq_start()
|
||||||
xappend "--addn-hosts=$(dirname $HOSTFILE)"
|
xappend "--addn-hosts=$(dirname $HOSTFILE)"
|
||||||
|
|
||||||
config_get dnsmasqconfdir "$cfg" confdir "/tmp/dnsmasq.d"
|
config_get dnsmasqconfdir "$cfg" confdir "/tmp/dnsmasq.d"
|
||||||
[ ! -d "$dnsmasqconfdir" ] && mkdir -p $dnsmasqconfdir
|
|
||||||
xappend "--conf-dir=$dnsmasqconfdir"
|
xappend "--conf-dir=$dnsmasqconfdir"
|
||||||
|
dnsmasqconfdir="${dnsmasqconfdir%%,*}"
|
||||||
|
[ ! -d "$dnsmasqconfdir" ] && mkdir -p $dnsmasqconfdir
|
||||||
xappend "--user=dnsmasq"
|
xappend "--user=dnsmasq"
|
||||||
xappend "--group=dnsmasq"
|
xappend "--group=dnsmasq"
|
||||||
echo >> $CONFIGFILE_TMP
|
echo >> $CONFIGFILE_TMP
|
||||||
|
|
Loading…
Reference in New Issue