gluon/package/gluon-config-mode-hostname/luasrc/lib/gluon/config-mode/wizard/0100-hostname.lua

21 lines
573 B
Lua
Raw Normal View History

return function(form, uci)
2018-02-23 05:26:10 +00:00
local pkg_i18n = i18n 'gluon-config-mode-hostname'
local pretty_hostname = require "pretty_hostname"
form:section(Section, nil, pkg_i18n.translate(
"The node name is used solely for identification of your node, e.g. on a "
.. "nodemap. It has no influence on the name (SSID) of the broadcasted WLAN."
))
local s = form:section(Section)
2018-02-23 05:26:10 +00:00
local o = s:option(Value, "hostname", pkg_i18n.translate("Node name"))
o.default = pretty_hostname.get(uci)
function o:write(data)
pretty_hostname.set(uci, data)
end
return {'system'}
end