|
|
@@ -12,6 +12,7 @@ ADD_WAN_FQDN=0
|
|
|
ADD_LOCAL_FQDN=""
|
|
|
|
|
|
BASECONFIGFILE="/var/etc/dnsmasq.conf"
|
|
|
+EXTRACONFFILE="extraconfig.conf"
|
|
|
BASEHOSTFILE="/tmp/hosts/dhcp"
|
|
|
TRUSTANCHORSFILE="/usr/share/dnsmasq/trust-anchors.conf"
|
|
|
TIMEVALIDFILE="/var/state/dnsmasqsec"
|
|
|
@@ -1121,14 +1122,19 @@ dnsmasq_start()
|
|
|
xappend "--dhcp-broadcast=tag:needs-broadcast"
|
|
|
|
|
|
|
|
|
- config_get dnsmasqconfdir "$cfg" confdir "/tmp/dnsmasq.d"
|
|
|
+ # Create a dnsmasq.d dir for each instance
|
|
|
+ config_get dnsmasqconfdir "$cfg" confdir "/tmp/dnsmasq${cfg:+.$cfg}.d"
|
|
|
xappend "--conf-dir=$dnsmasqconfdir"
|
|
|
dnsmasqconfdir="${dnsmasqconfdir%%,*}"
|
|
|
- [ ! -d "$dnsmasqconfdir" ] && mkdir -p $dnsmasqconfdir
|
|
|
+ [ ! -d "$dnsmasqconfdir" ] && mkdir -p "$dnsmasqconfdir"
|
|
|
xappend "--user=dnsmasq"
|
|
|
xappend "--group=dnsmasq"
|
|
|
echo >> $CONFIGFILE_TMP
|
|
|
|
|
|
+ # EXTRACONFFILE allows new dnsmasq parameters before they are natively handled in this init file
|
|
|
+ config_get extraconftext "$cfg" extraconftext
|
|
|
+ [ -n "$extraconftext" ] && echo -e "$extraconftext" > "$dnsmasqconfdir"/"$EXTRACONFFILE"
|
|
|
+
|
|
|
config_get_bool enable_tftp "$cfg" enable_tftp 0
|
|
|
[ "$enable_tftp" -gt 0 ] && {
|
|
|
config_get tftp_root "$cfg" tftp_root
|