Author: jow Date: 2015-11-26 13:04:38 +0100 (Thu, 26 Nov 2015) New Revision: 47655
Modified: trunk/package/base-files/files/lib/functions/uci-defaults-new.sh Log: 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 <[email protected]> Modified: trunk/package/base-files/files/lib/functions/uci-defaults-new.sh =================================================================== --- trunk/package/base-files/files/lib/functions/uci-defaults-new.sh 2015-11-26 12:04:32 UTC (rev 47654) +++ trunk/package/base-files/files/lib/functions/uci-defaults-new.sh 2015-11-26 12:04:38 UTC (rev 47655) @@ -349,16 +349,16 @@ 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 @@ 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 .. _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
