gluon/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/310-setup-mode-migrate
2016-07-10 20:14:25 +02:00

18 lines
409 B
Lua
Executable File

#!/usr/bin/lua
local site = require 'gluon.site_config'
local uci = require 'luci.model.uci'
local c = uci.cursor()
local old = c:get_first('gluon-config-mode', 'wizard', 'configured')
if old == '1' then
local setup_mode = c:get_first('gluon-setup-mode', 'setup_mode')
c:set('gluon-setup-mode', setup_mode, 'configured', '1')
c:save('gluon-setup-mode')
end
os.remove('/etc/config/gluon-config-mode')