The interfaces were accidentially switched when the CPE210 was separated from the CPE510 code.
22 lines
622 B
Lua
Executable File
22 lines
622 B
Lua
Executable File
#!/usr/bin/lua
|
|
|
|
local platform = require 'gluon.platform'
|
|
local sysconfig = require 'gluon.sysconfig'
|
|
|
|
|
|
if sysconfig.setup_ifname then
|
|
os.exit(0)
|
|
end
|
|
|
|
if
|
|
platform.match('ar71xx', 'generic', {'cpe210', 'cpe510', 'nanostation-m', 'nanostation-m-xw', 'unifi-outdoor-plus', 'uap-pro', 'unifiac-pro'}) or
|
|
platform.match('ar71xx', 'mikrotik')
|
|
then
|
|
sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.wan_ifname or sysconfig.lan_ifname
|
|
else
|
|
sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.lan_ifname or sysconfig.wan_ifname
|
|
end
|
|
|
|
-- Remove the old sysconfig setting
|
|
sysconfig.config_ifname = nil
|