2014-07-09 20:10:21 +02:00
|
|
|
#!/usr/bin/lua
|
2014-07-05 20:11:41 +02:00
|
|
|
|
2014-07-11 12:11:47 +02:00
|
|
|
local platform = require 'gluon.platform'
|
2014-07-09 20:10:21 +02:00
|
|
|
local sysconfig = require 'gluon.sysconfig'
|
2014-07-05 20:11:41 +02:00
|
|
|
|
|
|
|
|
2014-07-09 20:10:21 +02:00
|
|
|
if sysconfig.setup_ifname then
|
|
|
|
os.exit(0)
|
|
|
|
end
|
2014-07-05 20:11:41 +02:00
|
|
|
|
2015-04-08 00:42:22 +02:00
|
|
|
if platform.match('ar71xx', 'generic', {'cpe510', 'nanostation-m', 'nanostation-m-xw', 'unifi-outdoor-plus'}) then
|
2014-07-09 20:10:21 +02:00
|
|
|
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
|
2014-07-05 20:11:41 +02:00
|
|
|
|
2014-07-09 20:10:21 +02:00
|
|
|
-- Remove the old sysconfig setting
|
|
|
|
sysconfig.config_ifname = nil
|