diff --git a/package/gluon-config-mode/files/usr/lib/lua/luci/controller/gluon-config-mode/index.lua b/package/gluon-config-mode/files/usr/lib/lua/luci/controller/gluon-config-mode/index.lua index 1842caafdf37e184c169fef826ba7b9f83e5bbe4..906d926aec8936d6894d5d8bb8606ff58d1a91a2 100644 --- a/package/gluon-config-mode/files/usr/lib/lua/luci/controller/gluon-config-mode/index.lua +++ b/package/gluon-config-mode/files/usr/lib/lua/luci/controller/gluon-config-mode/index.lua @@ -58,8 +58,11 @@ function action_reboot() uci:save("gluon-config-mode") uci:commit("gluon-config-mode") + hostname = uci:get_first("system", "system", "hostname") + if nixio.fork() ~= 0 then - luci.template.render("gluon-config-mode/reboot", {pubkey=pubkey}) + luci.template.render("gluon-config-mode/reboot", + {pubkey=pubkey, hostname=hostname}) else debug.setfenv(io.stdout, debug.getfenv(io.open '/dev/null')) io.stdout:close() diff --git a/package/gluon-config-mode/generate/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm b/package/gluon-config-mode/generate/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm index 27be938512dc001f46319c86644dde6f60e29430..26a09a2fba05cda2029703712071a8f7a550f7d3 100644 --- a/package/gluon-config-mode/generate/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm +++ b/package/gluon-config-mode/generate/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm @@ -15,7 +15,7 @@ $Id$ <html> <head> - <title><%=luci.sys.hostname()%> - <% if title then %><%=title%><% else %><%:Rebooting...%><% end %></title> + <title><%=hostname%> - <% if title then %><%=title%><% else %><%:Rebooting...%><% end %></title> <link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/cascade.css" /> </head> <body> @@ -28,7 +28,7 @@ $Id$ @config_mode.msg_pubkey@ </p> <div class="the-key"> - # <%=luci.sys.hostname()%> + # <%=hostname%> <br/> <%=pubkey%> </div>