base-files: uci-defaults-new: don't store switch attr numbers as strings

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47643
This commit is contained in:
Jo-Philipp Wich 2015-11-25 15:43:15 +00:00
parent 6638374f5d
commit 212feb9ccf

View file

@ -91,11 +91,14 @@ ucidef_add_switch_attr() {
local val=$3
json_select_object switch
json_select_object $name
json_add_string $key $val
json_select ..
case "$val" in
[0-9]) json_add_int "$key" "$val" ;;
*) json_add_string "$key" "$val" ;;
esac
json_select ..
json_select ..
}