gluon/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname
Matthias Schiffer 8807c76a34
gluon-setup-mode: remove obsolete sysconfig.config_ifname migration
config_ifname was renamed to setup_ifname in Gluon v2015.1.
2020-05-10 16:38:42 +02:00

23 lines
472 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.is_outdoor_device() or
platform.match('ar71xx', 'generic', {
'airgateway',
'uap-pro',
'unifiac-pro'
}) or
platform.match('ar71xx', 'mikrotik')
then
sysconfig.setup_ifname = sysconfig.wan_ifname or sysconfig.lan_ifname
else
sysconfig.setup_ifname = sysconfig.lan_ifname or sysconfig.wan_ifname
end