diff options
author | Zoltan HERPAI <wigyori@uid0.hu> | 2015-01-30 00:12:29 +0000 |
---|---|---|
committer | Zoltan HERPAI <wigyori@uid0.hu> | 2015-01-30 00:12:29 +0000 |
commit | f75f6ead6497b59b405548c446eab9824d01dd22 (patch) | |
tree | a95db3876bb7d406b4547ff326b4f31d36f47f4e /target | |
parent | 523564cf44cd907d0e3f9181cd3490812406ac7a (diff) | |
download | upstream-f75f6ead6497b59b405548c446eab9824d01dd22.tar.gz upstream-f75f6ead6497b59b405548c446eab9824d01dd22.tar.bz2 upstream-f75f6ead6497b59b405548c446eab9824d01dd22.zip |
sunxi: introduce sunxi_board_name() in /lib/sunxi.sh
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44212 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/sunxi/base-files/lib/sunxi.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/sunxi/base-files/lib/sunxi.sh b/target/linux/sunxi/base-files/lib/sunxi.sh index b0a38740a4..d4dd9fedc4 100644 --- a/target/linux/sunxi/base-files/lib/sunxi.sh +++ b/target/linux/sunxi/base-files/lib/sunxi.sh @@ -135,3 +135,12 @@ sunxi_board_detect() { echo "$SUNXI_BOARD_MODEL" > /tmp/sysinfo/model echo "Detected $SUNXI_BOARD_NAME // $SUNXI_BOARD_MODEL" } + +sunxi_board_name() { + local name + + [ -f /tmp/sysinfo/board_name ] && name="$(cat /tmp/sysinfo/board_name)" + [ -z "$name" ] && name="unknown" + + echo "$name" +} |