[LEDE-DEV] [PATCH 1/5] base-files: introduce /lib/functions/board.sh

Roman Yeryomin leroi.lists at gmail.com
Fri Apr 28 05:56:35 PDT 2017


Signed-off-by: Roman Yeryomin <roman at advem.lv>
---
 package/base-files/files/lib/functions/board.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 package/base-files/files/lib/functions/board.sh

diff --git a/package/base-files/files/lib/functions/board.sh b/package/base-files/files/lib/functions/board.sh
new file mode 100644
index 0000000..28f3bad
--- /dev/null
+++ b/package/base-files/files/lib/functions/board.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+sysinfo()
+{
+	local file=$1
+	[ -e /tmp/sysinfo/$file ] && cat /tmp/sysinfo/$file || echo "generic"
+}
+
+board_name()
+{
+	sysinfo board_name
+}
+
+board_model()
+{
+	sysinfo model
+}
-- 
2.7.4




More information about the Lede-dev mailing list