projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Use uname instead of /proc for reading the system hostname
[project/luci.git]
/
libs
/
sys
/
luasrc
/
sys.lua
diff --git
a/libs/sys/luasrc/sys.lua
b/libs/sys/luasrc/sys.lua
index
e8b5e2c
..
2edb8f0
100644
(file)
--- 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.