From: Steven Barth Date: Thu, 30 Oct 2008 12:18:52 +0000 (+0000) Subject: Use uname instead of /proc for reading the system hostname X-Git-Tag: 0.9.0~1047 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fefe7c0f5dde412cf5ea5f5a9f48a99c9748b413;p=oweals%2Fluci.git Use uname instead of /proc for reading the system hostname --- diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua index e8b5e2c3a..2edb8f05a 100644 --- a/libs/sys/luasrc/sys.lua +++ b/libs/sys/luasrc/sys.lua @@ -132,7 +132,7 @@ getenv = posix.getenv --- Determine the current hostname. -- @return String containing the system hostname function hostname() - return io.lines("/proc/sys/kernel/hostname")() + return posix.uname("%n") end --- Returns the contents of a documented referred by an URL.