procd: options with default values are not parsed properly in the ubus register code
authorJohn Crispin <john@openwrt.org>
Wed, 13 Nov 2013 10:57:16 +0000 (10:57 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 13 Nov 2013 10:57:16 +0000 (10:57 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 38788

package/system/procd/files/procd.sh

index 7b8640ad727921a011e4d078fd09282dddf05123..d058c4ff5ea41bf5d4b9322a23c20b2c5386675b 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