This repository has been archived on 2024-05-11. You can view files and clone it, but cannot push or open issues or pull requests.
gluon-firmware/package/gluon-setup-mode/files/lib/gluon/upgrade/320-setup-ifname

19 lines
523 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', {'cpe510', 'nanostation-m', 'nanostation-m-xw'}) 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