From fefe7c0f5dde412cf5ea5f5a9f48a99c9748b413 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 30 Oct 2008 12:18:52 +0000 Subject: Use uname instead of /proc for reading the system hostname --- libs/sys/luasrc/sys.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/sys/luasrc/sys.lua') 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. -- cgit v1.2.3