gluon/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/300-setup-mode
Matthias Schiffer ee6afaced9
treewide: use new gluon.site Lua library
Some files have received some additional refactoring.
2017-08-11 22:07:34 +02:00

12 lines
359 B
Lua
Executable File

#!/usr/bin/lua
local site = require 'gluon.site'
local uci = require('simple-uci').cursor()
if site.setup_mode.skip(false) and not uci:get_first('gluon-setup-mode', 'setup_mode', 'configured', false) then
local name = uci:get_first("gluon-setup-mode", "setup_mode")
uci:set("gluon-setup-mode", name, "configured", true)
uci:save('gluon-setup-mode')
end