gluon/package/gluon-config-mode-hostname/luasrc/lib/gluon/config-mode/wizard/0100-hostname.lua
2017-02-22 01:31:25 +01:00

14 lines
300 B
Lua

return function(form, uci)
local pretty_hostname = require "pretty_hostname"
local s = form:section(Section)
local o = s:option(Value, "hostname", translate("Node name"))
o.default = pretty_hostname.get(uci)
function o:write(data)
pretty_hostname.set(uci, data)
end
return {'system'}
end