mkdir -p /tmp/hosts /tmp/dnsmasq.d
xappend "--addn-hosts=/tmp/hosts"
xappend "--conf-dir=/tmp/dnsmasq.d"
+ xappend "--user=dnsmasq"
+ xappend "--group=dnsmasq"
echo >> $CONFIGFILE
config_get networkid "$cfg" networkid
[ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid" "$force"
+ config_get_bool enable "$cfg" enable 1
+ [ "$enable" = "0" ] && return 0
+
config_get name "$cfg" name
config_get ip "$cfg" ip
[ -n "$ip" -o -n "$name" ] || return 0
if [ ! -f "$TIMESTAMPFILE" ]; then
touch "$TIMESTAMPFILE"
- chown nobody.nogroup "$TIMESTAMPFILE"
+ chown dnsmasq.dnsmasq "$TIMESTAMPFILE"
fi
echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE