aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-11-30 10:17:05 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-11-30 10:17:05 +0000
commitcfac7289c73b7d51c2f9873f43917dfa667fd1f4 (patch)
treece4c9441814546e31a04c9327c6c0768b8b37886 /package
parent06af9660946fa63246831a6e8249498a0c392220 (diff)
downloadupstream-cfac7289c73b7d51c2f9873f43917dfa667fd1f4.tar.gz
upstream-cfac7289c73b7d51c2f9873f43917dfa667fd1f4.tar.bz2
upstream-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')
-rwxr-xr-xpackage/base-files/files/lib/functions/uci-defaults-new.sh12
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