0900-msg-reboot.lua 524 B

1234567891011121314151617181920
  1. local site_i18n = i18n 'gluon-site'
  2. local site = require 'gluon.site'
  3. local sysconfig = require 'gluon.sysconfig'
  4. local pretty_hostname = require 'pretty_hostname'
  5. local uci = require("simple-uci").cursor()
  6. local hostname = pretty_hostname.get(uci)
  7. local contact = uci:get_first('gluon-node-info', 'owner', 'contact')
  8. local msg = site_i18n._translate('gluon-config-mode:reboot')
  9. if not msg then return end
  10. renderer.render_string(msg, {
  11. hostname = hostname,
  12. site = site,
  13. sysconfig = sysconfig,
  14. contact = contact,
  15. })