diff --git a/package/gluon-config-mode/Makefile b/package/gluon-config-mode/Makefile index e5131e182ff32b27ae6450106418e358d8c71b00..9a28d0279d7a6e2a8adc5d50b4d783b637ebcbf1 100644 --- a/package/gluon-config-mode/Makefile +++ b/package/gluon-config-mode/Makefile @@ -4,8 +4,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gluon-config-mode -PKG_VERSION:=1 -PKG_RELEASE:=1.$(GLUON_CONFIG_VERSION) +PKG_VERSION:=2 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) @@ -34,7 +33,6 @@ endef define Package/gluon-config-mode/install $(CP) ./files/* $(1)/ - $(GLUON_GENERATE) ./generate/* $(1)/ endef $(eval $(call BuildPackage,gluon-config-mode)) 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 afcc83fa2407a6cd3ca489198ec3ecea0a38a591..8803dde67fd2dd9f4bb870b080f4c29e8a5a79a8 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 @@ -12,8 +12,12 @@ $Id$ module("luci.controller.gluon-config-mode.index", package.seeall) +local site = require 'gluon.site_config' + + local meshvpn_name = "mesh_vpn" + function index() local uci_state = luci.model.uci.cursor_state() @@ -56,11 +60,11 @@ function action_reboot() uci:save("gluon-config-mode") uci:commit("gluon-config-mode") - hostname = uci:get_first("system", "system", "hostname") + local hostname = uci:get_first("system", "system", "hostname") if nixio.fork() ~= 0 then luci.template.render("gluon-config-mode/reboot", - {pubkey=pubkey, hostname=hostname}) + {pubkey=pubkey, hostname=hostname, site=site}) 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/cbi/wizard.htm b/package/gluon-config-mode/files/usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm similarity index 95% rename from package/gluon-config-mode/generate/usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm rename to package/gluon-config-mode/files/usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm index c67257eff87b8b3a4c84c1ef09b023614b2591a4..db5fe8b09d56979e54483c305ec2306632bfd637 100644 --- a/package/gluon-config-mode/generate/usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm +++ b/package/gluon-config-mode/files/usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm @@ -1,6 +1,10 @@ +<%- + local site = require 'gluon.site_config' +-%> + <h2>Willkommen!</h2> <p> - @config_mode.msg_welcome@ + <%= site.config_mode.msg_welcome %> </p> <% if not self.embedded then %> diff --git a/package/gluon-config-mode/generate/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm b/package/gluon-config-mode/files/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm similarity index 57% rename from package/gluon-config-mode/generate/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm rename to package/gluon-config-mode/files/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm index 26a09a2fba05cda2029703712071a8f7a550f7d3..fdf04d9a8b97dc4994107b1e52f17406af4f7b0c 100644 --- a/package/gluon-config-mode/generate/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm +++ b/package/gluon-config-mode/files/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm @@ -1,18 +1,3 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth <steven@midlink.org> -Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net> - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -$Id$ - --%> - <html> <head> <title><%=hostname%> - <% if title then %><%=title%><% else %><%:Rebooting...%><% end %></title> @@ -25,17 +10,17 @@ $Id$ <% if pubkey then %> <fieldset class="cbi-section"> <p> - @config_mode.msg_pubkey@ + <%= site.config_mode.msg_pubkey %> </p> <div class="the-key"> - # <%=hostname%> + # Hostname: <%= hostname %> <br/> - <%=pubkey%> + <%= pubkey %> </div> </fieldset> <% end %> <fieldset class="cbi-section"> - @config_mode.msg_reboot@ + <%= site.config_mode.msg_reboot %> </fieldset> </div> </div>