Skip to content

Commit

Permalink
gluon-core, gluon-setup-mode: reset ifname sysconfigs on each update
Browse files Browse the repository at this point in the history
Allow interface names to change on updates to handle hwconfig -> DSA and
similar migrations.
  • Loading branch information
neocturne committed Jan 9, 2022
1 parent 46bd518 commit 48cb99f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
9 changes: 1 addition & 8 deletions package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
#!/usr/bin/lua

local sysconfig = require 'gluon.sysconfig'

-- Are we already set up?
if sysconfig.lan_ifname or sysconfig.wan_ifname then
os.exit(0)
end


local platform = require 'gluon.platform'
local site = require 'gluon.site'
local sysconfig = require 'gluon.sysconfig'

local json = require 'jsonc'
local uci = require('simple-uci').cursor()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
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
Expand Down

0 comments on commit 48cb99f

Please sign in to comment.