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:
parent
6638374f5d
commit
212feb9ccf
1 changed files with 6 additions and 3 deletions
|
@ -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…
Reference in a new issue