libs/sys: Filter model string from /proc/diag/model
[project/luci.git] / 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