summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-10-30 13:13:38 +0000
committerSteven Barth <steven@midlink.org>2008-10-30 13:13:38 +0000
commit04cac6936e2a8bf3079f1d1476d080a39b9a133e (patch)
tree214bfd658a63a0ac41c86f90d2e572b6ca07ae52 /libs
parentd69e2df94595bd4845ff8b74edd8e1e0d4be28a1 (diff)
Use uname instead of /proc for reading the system hostname
Diffstat (limited to 'libs')
-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.