X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-base%2Fluasrc%2Ftools%2Fstatus.lua;h=a1ecbe71d0ec75adda91cdaca5f588cee2d80845;hp=ac053eac8cef4b191b30161336d216375dd7e683;hb=91511033564929af41fa1f57bccde7fbcb7f5620;hpb=f779b00d883f965e405944f3c872b5ee763836e7 diff --git a/modules/luci-base/luasrc/tools/status.lua b/modules/luci-base/luasrc/tools/status.lua index ac053eac8..a1ecbe71d 100644 --- 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 - 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")