diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-07-30 03:18:50 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-07-30 03:18:50 +0000 |
commit | f646e7cbe1ac8ab055a0e91e91a9f5fb12a6005a (patch) | |
tree | ecb690ed50ae8cdd65d821274ca2df1bee81be7b /openwrt/package | |
parent | 31e0ccf22f86a4aa11c032b66bfa0dd4f4b4baaa (diff) | |
download | mtk-20170518-f646e7cbe1ac8ab055a0e91e91a9f5fb12a6005a.zip mtk-20170518-f646e7cbe1ac8ab055a0e91e91a9f5fb12a6005a.tar.gz mtk-20170518-f646e7cbe1ac8ab055a0e91e91a9f5fb12a6005a.tar.bz2 |
only set dhcp_enable if lan proto is set to static
SVN-Revision: 4324
Diffstat (limited to 'openwrt/package')
-rw-r--r-- | openwrt/package/dnsmasq/files/dnsmasq.init | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openwrt/package/dnsmasq/files/dnsmasq.init b/openwrt/package/dnsmasq/files/dnsmasq.init index 140f727..14fc698 100644 --- a/openwrt/package/dnsmasq/files/dnsmasq.init +++ b/openwrt/package/dnsmasq/files/dnsmasq.init @@ -13,8 +13,9 @@ scan_interfaces args="" iface=lan 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_num="${dhcp_num:-50}" dhcp_lease="${dhcp_lease:-12h}" @@ -33,7 +34,7 @@ dhcp_lease="${dhcp_lease:-12h}" eval $(ipcalc $ipaddr $netmask ${dhcp_start:-100} ${dhcp_num:-150}) # 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 start $START" echo "@define end $END" |