mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-24 20:53:22 +02:00
only set dhcp_enable if lan proto is set to static
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4324 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
c4f3575368
commit
e8267e6743
@ -13,8 +13,9 @@ scan_interfaces
|
|||||||
args=""
|
args=""
|
||||||
iface=lan
|
iface=lan
|
||||||
config_get ifname "$iface" ifname
|
config_get ifname "$iface" ifname
|
||||||
|
config_get proto "$iface" proto
|
||||||
|
|
||||||
dhcp_enable="${dhcp_enable:-1}"
|
[ "$proto" = static ] && dhcp_enable="${dhcp_enable:-1}"
|
||||||
dhcp_start="${dhcp_start:-100}"
|
dhcp_start="${dhcp_start:-100}"
|
||||||
dhcp_num="${dhcp_num:-50}"
|
dhcp_num="${dhcp_num:-50}"
|
||||||
dhcp_lease="${dhcp_lease:-12h}"
|
dhcp_lease="${dhcp_lease:-12h}"
|
||||||
@ -33,7 +34,7 @@ dhcp_lease="${dhcp_lease:-12h}"
|
|||||||
eval $(ipcalc $ipaddr $netmask ${dhcp_start:-100} ${dhcp_num:-150})
|
eval $(ipcalc $ipaddr $netmask ${dhcp_start:-100} ${dhcp_num:-150})
|
||||||
|
|
||||||
# and pass the args via config parser defines
|
# and pass the args via config parser defines
|
||||||
echo "@define dhcp_enable 1"
|
echo "${dhcp_enable:+@define dhcp_enable 1}"
|
||||||
echo "@define netmask $NETMASK"
|
echo "@define netmask $NETMASK"
|
||||||
echo "@define start $START"
|
echo "@define start $START"
|
||||||
echo "@define end $END"
|
echo "@define end $END"
|
||||||
|
Loading…
Reference in New Issue
Block a user