luci-base: drop ipv6 lease status when IPV6 is not support

Signed-off-by: Rosy Song <rosysong@rosinson.com>
This commit is contained in:
Rosy Song 2018-09-23 15:38:38 +08:00
parent 89a4fdd1a8
commit 8c57f886fc

View file

@ -79,6 +79,12 @@
</div> </div>
</div> </div>
<%
local fs = require "nixio.fs"
local has_ipv6 = fs.access("/proc/net/ipv6_route")
if has_ipv6 then
-%>
<div class="cbi-section" style="display:none"> <div class="cbi-section" style="display:none">
<h3><%:Active DHCPv6 Leases%></h3> <h3><%:Active DHCPv6 Leases%></h3>
<div class="table" id="lease6_status_table"> <div class="table" id="lease6_status_table">
@ -93,3 +99,4 @@
</div> </div>
</div> </div>
</div> </div>
<% end -%>