summaryrefslogtreecommitdiffhomepage
path: root/libs/sys/luasrc
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-10-30 12:18:52 +0000
committerSteven Barth <steven@midlink.org>2008-10-30 12:18:52 +0000
commitfefe7c0f5dde412cf5ea5f5a9f48a99c9748b413 (patch)
treec6b99cd8d77a87d23d709cff882e5b73cd4233a9 /libs/sys/luasrc
parent50442d7438766d8d67b33167978c23eb7713375c (diff)
Use uname instead of /proc for reading the system hostname
Diffstat (limited to 'libs/sys/luasrc')
-rw-r--r--libs/sys/luasrc/sys.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua
index e8b5e2c3a7..2edb8f05ae 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.