From cfac7289c73b7d51c2f9873f43917dfa667fd1f4 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 30 Nov 2015 10:17:05 +0000 Subject: [PATCH] base-files: uci-defaults-new: add board id and name helpers 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 SVN-Revision: 47671 --- .../files/lib/functions/uci-defaults-new.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 e79ec99f53..3fe89838e4 100755 --- a/package/base-files/files/lib/functions/uci-defaults-new.sh +++ b/package/base-files/files/lib/functions/uci-defaults-new.sh @@ -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 -- 2.25.1