projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50442d7
)
Use uname instead of /proc for reading the system hostname
author
Steven Barth
<steven@midlink.org>
Thu, 30 Oct 2008 12:18:52 +0000
(12:18 +0000)
committer
Steven Barth
<steven@midlink.org>
Thu, 30 Oct 2008 12:18:52 +0000
(12:18 +0000)
libs/sys/luasrc/sys.lua
patch
|
blob
|
history
diff --git
a/libs/sys/luasrc/sys.lua
b/libs/sys/luasrc/sys.lua
index e8b5e2c3a7e0c9f5e967df3eb14a78e0700a00e9..2edb8f05ae0258511173ba0153f8c671f23c41a8 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.