summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-12-05 16:38:54 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-12-05 16:38:54 +0000
commitf6ee6322f9aa1152deb6f85735b18f0f85532e1f (patch)
tree9bafeed52a807d65e86da851ebde9160d350a615
parente046455389f1030accf1341a6d75992c9b0a9447 (diff)
From c63e369d57cb6862a8890c7b2ee1b6b449b2c42d Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org> Date: Mon, 5 Dec 2011 14:36:34 +0100 Subject: [PATCH] libs/sys: read model name from /tmp/sysinfo/model if present Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
-rw-r--r--libs/sys/luasrc/sys.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua
index f9b253e764..9c30f55f6c 100644
--- a/libs/sys/luasrc/sys.lua
+++ b/libs/sys/luasrc/sys.lua
@@ -183,6 +183,7 @@ function sysinfo()
cpuinfo:match("model name\t+: ([^\n]+)")
local model =
+ luci.util.pcdata(fs.readfile("/tmp/sysinfo/model")) or
cpuinfo:match("machine\t+: ([^\n]+)") or
cpuinfo:match("Hardware\t+: ([^\n]+)") or
luci.util.pcdata(fs.readfile("/proc/diag/model")) or