NIU:
[project/luci.git] / modules / niu / luasrc / model / cbi / niu / network / etherwan.lua
index 4f2744b..56350b3 100644 (file)
@@ -14,17 +14,15 @@ $Id$
 ]]--
 
 local fs = require "nixio.fs"
-local nw = require "luci.model.network"
 
-local has_ipv6 = nw:has_ipv6()
+local has_ipv6  = fs.access("/proc/net/ipv6_route")
 local has_pptp  = fs.access("/usr/sbin/pptp")
 local has_pppd  = fs.access("/usr/sbin/pppd")
 local has_pppoe = fs.glob("/usr/lib/pppd/*/rp-pppoe.so")()
 local has_pppoa = fs.glob("/usr/lib/pppd/*/pppoatm.so")()
 
 
-m = Map("network", "Configure Ethernet Adapter")
-nw.init(m.uci)
+m = Map("network", "Configure Ethernet Adapter for Internet Connection")
 
 s = m:section(NamedSection, "wan", "interface")
 s.addremove = false
@@ -32,14 +30,14 @@ s.addremove = false
 s:tab("general", translate("General Settings"))
 s:tab("expert", translate("Expert Settings"))
 
-p = s:taboption("general", ListValue, "proto", "Connection Type")
+p = s:taboption("general", ListValue, "proto", translate("Connection Protocol"))
 p.override_scheme = true
 p.default = "dhcp"
-p:value("dhcp", "Cable / Ethernet / DHCP")
+p:value("dhcp", translate("Cable / Ethernet / DHCP"))
 if has_pppoe then p:value("pppoe", "DSL / PPPoE")   end
 if has_pppoa then p:value("pppoa", "PPPoA")   end
 if has_pptp  then p:value("pptp",  "PPTP")    end
-p:value("static", "Static Ethernet")
+p:value("static", translate("Static Ethernet"))