kernel: add KEY_WPS_BUTTON definition
[openwrt.git] / package / dnsmasq / files / dnsmasq.init
index 3509d94..47c4c2d 100644 (file)
@@ -263,7 +263,7 @@ dhcp_add() {
 
        leasetime="${leasetime:-12h}"
        start="$(dhcp_calc "${start:-100}")"
-       limit="$(${limit:-150})"
+       limit="${limit:-150}"
        eval "$(ipcalc.sh $ipaddr $netmask $start $limit)"
        if [ "$dynamicdhcp" = "0" ]; then END="static"; fi
        append args "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}"
@@ -284,16 +284,22 @@ dhcp_option_add() {
 
 dhcp_domain_add() {
        local cfg="$1"
+       local ip name names
 
-       config_get name "$cfg" name
-       [ -n "$name" ] || return 0
+       config_get names "$cfg" name
+       [ -n "$names" ] || return 0
 
        config_get ip "$cfg" ip
        [ -n "$ip" ] || return 0
 
        local oIFS="$IFS"; IFS="."; set -- $ip; IFS="$oIFS"
-       append args "-A /$name${DOMAIN:+.$DOMAIN}/$ip"
-       append args "--ptr-record=$4.$3.$2.$1.in-addr.arpa,$name${DOMAIN:+.$DOMAIN}"
+       local raddr="${4:+$4.$3.$2.$1.in-addr.arpa}"
+
+       for name in $names; do
+               append args "-A /$name/$ip"
+               [ -n "$raddr" ] && \
+                       append args "--ptr-record=$raddr,$name"
+       done
 }
 
 start() {
This page took 0.022465 seconds and 4 git commands to generate.