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
v19.07.3_mercusys_ac12_duma
Jo-Philipp Wich 9 years ago
parent 6638374f5d
commit 212feb9ccf

@ -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 ..
}

Loading…
Cancel
Save