Finally fix the usage of limit (#2240)
[openwrt/svn-archive/archive.git] / package / dnsmasq / files / dnsmasq.init
index 8a5dc9a9c13d200cfee9008d663e892558856924..c39e58417f33c38f4e67c6197ca1e016b79888c1 100644 (file)
@@ -31,12 +31,12 @@ dnsmasq() {
        append_bool "$cfg" nodaemon "-d"
        append_bool "$cfg" domainneeded "-D"
        append_bool "$cfg" filterwin2k "-f"
-       append_bool "$cfg" nohosts "-I $nohosts"
+       append_bool "$cfg" nohosts "-h"
        append_bool "$cfg" nonegcache "-N"
        append_bool "$cfg" strictorder "-o"
        append_bool "$cfg" logqueries "-q"
-       append_bool "$cfg" noresolv "-I $noresolv"
-       append_bool "$cfg" localise_queries "-I $localise_queries"
+       append_bool "$cfg" noresolv "-R"
+       append_bool "$cfg" localise_queries "-y"
        append_bool "$cfg" readethers "-Z"
        append_bool "$cfg" dbus "-l"
        
@@ -173,7 +173,7 @@ dhcp_add() {
        config_get ifname "$net" ifname
        [ -n "$ifname" ] || return 0
 
-       append_bool "$cfg" ingore "-I $ifname"
+       append_bool "$cfg" ignore "-I $ifname"
 
        config_get proto "$net" proto
        [ static = "$proto" ] || return 0
@@ -195,7 +195,7 @@ dhcp_add() {
        leasetime="${leasetime:-12h}"
        start="$(dhcp_calc "${start:-100}")"
        limit="$((${limit:-150} + 1))"
-       eval "$(ipcalc.sh $ipaddr $netmask $start $end)"
+       eval "$(ipcalc.sh $ipaddr $netmask $start $limit)"
        append args "--dhcp-range=$name,$START,$END,$NETMASK,$leasetime${options:+ $options}"
        
        dhcp_option_add "$cfg" "$name"