Added device tree model support
authorVladimir Ulrich <admin@evl.su>
Fri, 18 Jul 2014 15:39:09 +0000 (19:39 +0400)
committerVladimir Ulrich <admin@evl.su>
Fri, 10 Oct 2014 15:59:35 +0000 (19:59 +0400)
Signed-off-by: Vladimir Ulrich <admin@evl.su>
modules/base/luasrc/sys.lua

index df6280dda091c02a00e2dddd984301fcce19695a..3a04f6badabaa7875ebb010fd65738e8cb55585e 100644 (file)
@@ -186,6 +186,7 @@ function sysinfo()
                cpuinfo:match("model name\t+: ([^\n]+)")
 
        local model =
+               fs.readfile("/proc/device-tree/model") or
                luci.util.pcdata(fs.readfile("/tmp/sysinfo/model")) or
                cpuinfo:match("machine\t+: ([^\n]+)") or
                cpuinfo:match("Hardware\t+: ([^\n]+)") or