aboutsummaryrefslogtreecommitdiffstats
path: root/package/dnsmasq/files/dnsmasq.init
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2008-09-07 20:07:55 +0000
committerSteven Barth <cyrus@openwrt.org>2008-09-07 20:07:55 +0000
commit05118305ec47c7c7663769a2d8a12daf9580c630 (patch)
tree8404c1bc9859828a03ec20102e8680ba045e06d2 /package/dnsmasq/files/dnsmasq.init
parentfefd23fe1302f92b32c230f3ba2360055349331d (diff)
downloadupstream-05118305ec47c7c7663769a2d8a12daf9580c630.tar.gz
upstream-05118305ec47c7c7663769a2d8a12daf9580c630.tar.bz2
upstream-05118305ec47c7c7663769a2d8a12daf9580c630.zip
dnsmasq: Use a more intelligent way of parsing dhcp-options using the new UCI list datatype
SVN-Revision: 12547
Diffstat (limited to 'package/dnsmasq/files/dnsmasq.init')
-rw-r--r--package/dnsmasq/files/dnsmasq.init10
1 files changed, 3 insertions, 7 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index 8643349573..4fddc47232 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -242,13 +242,9 @@ dhcp_option_add() {
local cfg="$1"
local name="$2"
- for count in $(seq 0 100); do
- eval current_value=\$CONFIG_"$cfg"_dhcp"$count"
- if [ -z "$current_value" ]; then
- let "count-=1"
- break
- fi
- append args "-O $name","$current_value"
+ config_get dhcp_option "$cfg" dhcp_option
+ for o in $dhcp_option; do
+ append args "-O $name","$o"
done
}