1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-18 08:45:20 +02:00

add option to turn off dynamic dhcp closes #2694

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9608 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
thepeople 2007-11-28 03:02:20 +00:00
parent fadaa82e81
commit 5e4f3f7961

View File

@ -200,11 +200,13 @@ dhcp_add() {
config_get limit "$cfg" limit config_get limit "$cfg" limit
config_get leasetime "$cfg" leasetime config_get leasetime "$cfg" leasetime
config_get options "$cfg" options config_get options "$cfg" options
config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1
leasetime="${leasetime:-12h}" leasetime="${leasetime:-12h}"
start="$(dhcp_calc "${start:-100}")" start="$(dhcp_calc "${start:-100}")"
limit="$((${limit:-150} + 1))" limit="$((${limit:-150} + 1))"
eval "$(ipcalc.sh $ipaddr $netmask $start $limit)" eval "$(ipcalc.sh $ipaddr $netmask $start $limit)"
if [ "$dynamicdhcp" = "0" ]; then END="static"; fi
append args "--dhcp-range=$name,$START,$END,$NETMASK,$leasetime${options:+ $options}" append args "--dhcp-range=$name,$START,$END,$NETMASK,$leasetime${options:+ $options}"
dhcp_option_add "$cfg" "$name" dhcp_option_add "$cfg" "$name"