diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-11-30 10:17:05 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-11-30 10:17:05 +0000 |
commit | cfac7289c73b7d51c2f9873f43917dfa667fd1f4 (patch) | |
tree | ce4c9441814546e31a04c9327c6c0768b8b37886 /package/base-files/files/lib/functions | |
parent | 06af9660946fa63246831a6e8249498a0c392220 (diff) | |
download | master-31e0f0ae-cfac7289c73b7d51c2f9873f43917dfa667fd1f4.tar.gz master-31e0f0ae-cfac7289c73b7d51c2f9873f43917dfa667fd1f4.tar.bz2 master-31e0f0ae-cfac7289c73b7d51c2f9873f43917dfa667fd1f4.zip |
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 <jow@openwrt.org>
SVN-Revision: 47671
Diffstat (limited to 'package/base-files/files/lib/functions')
-rwxr-xr-x | package/base-files/files/lib/functions/uci-defaults-new.sh | 12 |
1 files changed, 12 insertions, 0 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 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 |