diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-11-26 12:04:38 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-11-26 12:04:38 +0000 |
commit | 96eb44ff6bf7d1d6724ae6309e02b6ae1ee01b85 (patch) | |
tree | aee97f8886a2c284dd7361bab1383bd2ec4c670a /package/base-files/files | |
parent | 1fe4c24250cfc94f1e15744d077ab1091fa3e730 (diff) | |
download | master-187ad058-96eb44ff6bf7d1d6724ae6309e02b6ae1ee01b85.tar.gz master-187ad058-96eb44ff6bf7d1d6724ae6309e02b6ae1ee01b85.tar.bz2 master-187ad058-96eb44ff6bf7d1d6724ae6309e02b6ae1ee01b85.zip |
base-files: uci-defaults-new: fix storing rssi leds and triggers in board.json
Remove extra nesting of rssi leds in the led object and move rssi monitor
declaration to its own object.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47655 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-x | package/base-files/files/lib/functions/uci-defaults-new.sh | 13 |
1 files changed, 6 insertions, 7 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 f795af33d7..6f9d716e9b 100755 --- a/package/base-files/files/lib/functions/uci-defaults-new.sh +++ b/package/base-files/files/lib/functions/uci-defaults-new.sh @@ -349,16 +349,16 @@ ucidef_set_led_rssi() { json_select_object led - json_select_object rssi json_select_object "$1" + json_add_string type rssi json_add_string name "$name" + json_add_string iface "$iface" json_add_string sysfs "$sysfs" json_add_string minq "$minq" json_add_string maxq "$maxq" json_add_string offset "$offset" json_add_string factor "$factor" json_select .. - json_select .. json_select .. } @@ -368,12 +368,11 @@ ucidef_set_rssimon() { local refresh="$2" local threshold="$3" - json_select_object led + json_select_object rssimon - json_select_object rssi - json_add_string type rssi - json_add_string dev "$dev" - json_add_string threshold "$threshold" + json_select_object "$dev" + [ -n "$refresh" ] && json_add_int refresh "$refresh" + [ -n "$threshold" ] && json_add_int threshold "$threshold" json_select .. json_select .. |