gluon/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/310-setup-mode-migrate
Matthias Schiffer 6cf03bab37
treewide: replace normal uses of luci.model.uci with simple-uci to reduce LuCI dependencies
We also make use of the boolean support of simple-uci to make scripts
clearer.
2017-02-10 02:10:01 +01:00

15 lines
359 B
Lua
Executable File

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