Use uname instead of /proc for reading the system hostname
This commit is contained in:
parent
d69e2df945
commit
04cac6936e
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue