gluon/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/300-setup-mode
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
398 B
Lua
Executable File

#!/usr/bin/lua
local site = require 'gluon.site_config'
local uci = require('simple-uci').cursor()
if site.setup_mode
and site.setup_mode.skip
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