procd: options with default values are not parsed properly in the ubus register code
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 13 Nov 2013 10:57:16 +0000 (10:57 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 13 Nov 2013 10:57:16 +0000 (10:57 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38788 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/system/procd/files/procd.sh

index 7b8640a..d058c4f 100644 (file)
@@ -229,7 +229,8 @@ uci_validate_section()
                shift; shift; shift
 
                while [ -n "$1" ]; do
-                       json_add_string "${1%:*}" "${1#*:}"
+                       local tmp=${1#*:}
+                       json_add_string "${1%%:*}" "${tmp%%:*}"
                        shift
                done