diff options
Diffstat (limited to 'package')
-rwxr-xr-x | package/base-files/files/lib/functions/uci-defaults-new.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults-new.sh b/package/base-files/files/lib/functions/uci-defaults-new.sh index 6a8b6b9029..64241d5a5e 100755 --- a/package/base-files/files/lib/functions/uci-defaults-new.sh +++ b/package/base-files/files/lib/functions/uci-defaults-new.sh @@ -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 .. } |