0100-hostname.lua 300 B

12345678910111213
  1. return function(form, uci)
  2. local pretty_hostname = require "pretty_hostname"
  3. local s = form:section(Section)
  4. local o = s:option(Value, "hostname", translate("Node name"))
  5. o.default = pretty_hostname.get(uci)
  6. function o:write(data)
  7. pretty_hostname.set(uci, data)
  8. end
  9. return {'system'}
  10. end