libs/sys: Filter model string from /proc/diag/model
authorManuel Munz <freifunk@somakoma.de>
Mon, 14 Feb 2011 18:54:00 +0000 (18:54 +0000)
committerManuel Munz <freifunk@somakoma.de>
Mon, 14 Feb 2011 18:54:00 +0000 (18:54 +0000)
libs/sys/luasrc/sys.lua

index 2bdc15e..8b05d44 100644 (file)
@@ -185,7 +185,7 @@ function sysinfo()
        local model =
                cpuinfo:match("machine\t+: ([^\n]+)") or
                cpuinfo:match("Hardware\t+: ([^\n]+)") or
-               fs.readfile("/proc/diag/model") or
+               luci.util.pcdata(fs.readfile("/proc/diag/model")) or
                nixio.uname().machine or
                system