summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-08 12:26:45 +0000
committerSteven Barth <steven@midlink.org>2008-08-08 12:26:45 +0000
commite080fcebd2396c138d8c916d1cf385a88e0db246 (patch)
tree9a41e995a438d8ac32c9501f44800bf3d0e7d297 /modules
parentf4ec942d1bc3d9a6c822c075017cb2949cd8fff5 (diff)
libs/core: Cleaned up luci.sys in favor of the new luci.ip module
Diffstat (limited to 'modules')
-rw-r--r--modules/admin-full/luasrc/view/admin_status/routes.htm6
-rw-r--r--modules/freifunk/luasrc/controller/freifunk/luciinfo.lua4
-rw-r--r--modules/freifunk/luasrc/view/public_status/index.htm2
3 files changed, 6 insertions, 6 deletions
diff --git a/modules/admin-full/luasrc/view/admin_status/routes.htm b/modules/admin-full/luasrc/view/admin_status/routes.htm
index c4ebf347a..bfee6227e 100644
--- a/modules/admin-full/luasrc/view/admin_status/routes.htm
+++ b/modules/admin-full/luasrc/view/admin_status/routes.htm
@@ -30,9 +30,9 @@ local routes = luci.sys.net.routes()
for i, r in pairs(routes) do
%>
<tr>
-<td><%=luci.sys.net.hexip4(r.Destination)%></td>
-<td><%=luci.sys.net.hexip4(r.Mask)%></td>
-<td><%=luci.sys.net.hexip4(r.Gateway)%></td>
+<td><%=luci.ip.Hex(r.Destination, 32):string()%></td>
+<td><%=luci.ip.Hex(r.Mask, 32):string()%></td>
+<td><%=luci.ip.Hex(r.Gateway, 32):string()%></td>
<td><%=r.Metric%></td>
<td><%=r.Iface%></td>
</tr>
diff --git a/modules/freifunk/luasrc/controller/freifunk/luciinfo.lua b/modules/freifunk/luasrc/controller/freifunk/luciinfo.lua
index 4ab63a068..5ddb791fe 100644
--- a/modules/freifunk/luasrc/controller/freifunk/luciinfo.lua
+++ b/modules/freifunk/luasrc/controller/freifunk/luciinfo.lua
@@ -28,7 +28,7 @@ function action_index()
-- Sysinfo
local s, m, r = luci.sys.sysinfo()
local dr = luci.sys.net.defaultroute()
- dr = dr and luci.sys.net.hexip4(dr.Gateway) or ""
+ dr = dr and luci.ip.Hex(dr.Gateway, 32, luci.ip.FAMILY_INET4):string()
local l1, l5, l15 = luci.sys.loadavg()
luci.http.write("sysinfo.system=" .. sanitize(s) .. "\n")
@@ -38,7 +38,7 @@ function action_index()
luci.http.write("sysinfo.load1=" .. tostring(l1) .. "\n")
luci.http.write("sysinfo.load5=" .. tostring(l5) .. "\n")
luci.http.write("sysinfo.load15=" .. tostring(l15) .. "\n")
- luci.http.write("sysinfo.defaultgw=" .. dr .. "\n")
+ luci.http.write("sysinfo.defaultgw=" .. dr or "" .. "\n")
-- Freifunk
diff --git a/modules/freifunk/luasrc/view/public_status/index.htm b/modules/freifunk/luasrc/view/public_status/index.htm
index a10f22f43..aa56834ba 100644
--- a/modules/freifunk/luasrc/view/public_status/index.htm
+++ b/modules/freifunk/luasrc/view/public_status/index.htm
@@ -88,7 +88,7 @@ $Id$
for i, rt in pairs(routes) do
%>
<tr>
-<td><%=luci.sys.net.hexip4(rt.Gateway)%></th>
+<td><%=luci.ip.Hex(rt.Gateway, 32):string()%></th>
<td><%=rt.Metric%></th>
<td><%=rt.Iface%></th>
</tr>