diff options
author | Steven Barth <steven@midlink.org> | 2008-09-07 20:07:55 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-09-07 20:07:55 +0000 |
commit | 4d20db10d5283bf68ca85be8029ea97221d6fd80 (patch) | |
tree | 8fd6c760af389e8842c15d48fc4e81d040937234 /package/dnsmasq | |
parent | 0ea2967af95af8321179dafaf3cfddb643fc2bbb (diff) | |
download | upstream-4d20db10d5283bf68ca85be8029ea97221d6fd80.tar.gz upstream-4d20db10d5283bf68ca85be8029ea97221d6fd80.tar.bz2 upstream-4d20db10d5283bf68ca85be8029ea97221d6fd80.zip |
dnsmasq: Use a more intelligent way of parsing dhcp-options using the new UCI list datatype
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12547 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/dnsmasq')
-rw-r--r-- | package/dnsmasq/files/dnsmasq.init | 10 |
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 } |