2 LuCI - Lua Configuration Interface
4 Copyright 2009 Steven Barth <steven@midlink.org>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
15 local cursor = require "luci.model.uci".inst_state
16 local nw = require "luci.model.network"
19 m = Map("network", "Configure Internet Connection")
20 s = m:section(NamedSection, "wan", "interface", "Internet Connection Device")
24 l = s:option(ListValue, "_wandev", "Internet Connection via")
26 for _, iface in ipairs(nw.get_interfaces()) do
27 if iface:name():find("eth") == 1 then
28 local net = iface:get_network()
29 if not net or net:name() == "wan" or os.getenv("LUCI_SYSROOT") then
30 l:value("ethernet:%s" % iface:name(),
31 "Cable / DSL / Ethernet Adapter (%s)" % iface:name())
36 l:value("none", "No Internet Connection")