gluon/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname
2021-06-26 02:17:15 +02:00

16 lines
340 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() then
sysconfig.setup_ifname = sysconfig.wan_ifname or sysconfig.lan_ifname
else
sysconfig.setup_ifname = sysconfig.lan_ifname or sysconfig.wan_ifname
end