base-files: uci-defaults-new: add board id and name helpers
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 30 Nov 2015 10:17:05 +0000 (10:17 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 30 Nov 2015 10:17:05 +0000 (10:17 +0000)
Add ucidef_set_board_id() and ucidef_set_model_name() procedures to store
model information in the board.json file.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 47671

package/base-files/files/lib/functions/uci-defaults-new.sh

index e79ec99f531ebe8fc7d76c561e468f7afb651737..3fe89838e4d42cba6ca45a5bd18c977db2867c58 100755 (executable)
@@ -38,6 +38,18 @@ _ucidef_set_interface() {
        json_select ..
 }
 
+ucidef_set_board_id() {
+       json_select_object model
+       json_add_string id "$1"
+       json_select ..
+}
+
+ucidef_set_model_name() {
+       json_select_object model
+       json_add_string name "$1"
+       json_select ..
+}
+
 ucidef_set_interface_loopback()
 {
        # stub