projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #706 from KevinOConnor/anonidentity-20160407
[project/luci.git]
/
modules
/
luci-base
/
luasrc
/
tools
/
status.lua
diff --git
a/modules/luci-base/luasrc/tools/status.lua
b/modules/luci-base/luasrc/tools/status.lua
index
ac053ea
..
a1ecbe7
100644
(file)
--- a/
modules/luci-base/luasrc/tools/status.lua
+++ b/
modules/luci-base/luasrc/tools/status.lua
@@
-48,7
+48,15
@@
local function dhcp_leases_common(family)
fd:close()
end
fd:close()
end
- local fd = io.open("/tmp/hosts/odhcpd", "r")
+ local lease6file = "/tmp/hosts/odhcpd"
+ uci:foreach("dhcp", "odhcpd",
+ function(t)
+ if t.leasefile and nfs.access(t.leasefile) then
+ lease6file = t.leasefile
+ return false
+ end
+ end)
+ local fd = io.open(lease6file, "r")
if fd then
while true do
local ln = fd:read("*l")
if fd then
while true do
local ln = fd:read("*l")