From 896847ced141f8415ae20ccae5840eaadce2b884 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 7 Sep 2008 20:07:55 +0000 Subject: [PATCH] dnsmasq: Use a more intelligent way of parsing dhcp-options using the new UCI list datatype SVN-Revision: 12547 --- package/dnsmasq/files/dnsmasq.init | 10 +++------- 1 file 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 } -- 2.30.2