* luci/themes: fix log pages
[project/luci.git] / libs / sys / luasrc / sys.lua
index 2332ceb..52ed0c3 100644 (file)
@@ -188,6 +188,9 @@ function sysinfo()
        if not system then
                system = posix.uname("%m")
                model = cpuinfo:match("model name.-:%s*([^\n]+)")
+               if not model then
+                       model = cpuinfo:match("Processor.-:%s*([^\n]+)")
+               end
        else
                model = cpuinfo:match("cpu model.-:%s*([^\n]+)")
        end
@@ -201,6 +204,12 @@ function syslog()
        return luci.util.exec("logread")
 end
 
+--- Retrieves the output of the "dmesg" command.
+-- @return     String containing the current log buffer
+function dmesg()
+       return luci.util.exec("dmesg")
+end
+
 --- Generates a random id with specified length.
 -- @param bytes        Number of bytes for the unique id
 -- @return             String containing hex encoded id