<%# Copyright 2010 Jo-Philipp Wich Licensed to the public under the Apache License 2.0. -%> <%+header%> <% local fs = require "nixio.fs" local has_ping6 = fs.access("/bin/ping6") or fs.access("/usr/bin/ping6") local has_traceroute6 = fs.access("/bin/traceroute6") or fs.access("/usr/bin/traceroute6") local board_name = fs.readfile("/tmp/sysinfo/board_name",64) local has_eth0 = nil~=string.find(board_name,"G520") or nil~=string.find(board_name,"X300") local has_eth1 = nil == string.find(board_name,"X300") --luci.sys.exec("logger '" .. board_name .. tostring(has_eth0) .. "," .. tostring(has_eth1) .."'") local dns_host = luci.config.diag and luci.config.diag.dns or "" local ping_host = luci.config.diag and luci.config.diag.ping or "" local route_host = luci.config.diag and luci.config.diag.route or "" %>

<%:Diagnostics%>

<%:Network Utilities%>

<% if has_ping6 then %> <% else %> <% end %>

<% if has_traceroute6 then %> <% else %> <% end %> <% if not has_traceroute6 then %>

 

<%:Install iputils-traceroute6 for IPv6 traceroute%>

<% end %>

<%:Cable Diagnostics%>
<% if has_eth0 then %> <% end %> <% if has_eth1 then %> <% end %>
Port 1
Port 2
<%+footer%>