diff --git a/Makefile b/Makefile
index 0108e0a0..af233eff 100644
--- a/Makefile
+++ b/Makefile
@@ -99,7 +99,7 @@ config: FORCE
&& scripts/target_config.sh generic \
&& GLUON_SITEDIR='$(GLUON_SITEDIR)' scripts/target_config.sh '$(GLUON_TARGET)' \
$(foreach pkg,$(GLUON_PACKAGES_YES),&& echo 'CONFIG_PACKAGE_$(pkg)=y') \
- $(foreach lang,$(GLUON_LANGS),&& echo 'CONFIG_LUCI_LANG_$(lang)=y') \
+ $(foreach lang,$(GLUON_LANGS),&& echo 'CONFIG_GLUON_WEB_LANG_$(lang)=y') \
&& echo 'CONFIG_GLUON_RELEASE="$(GLUON_RELEASE)"' \
&& echo 'CONFIG_GLUON_SITEDIR="$(GLUON_SITEDIR)"' \
&& echo 'CONFIG_GLUON_BRANCH="$(GLUON_BRANCH)"' \
diff --git a/docs/dev/configmode.rst b/docs/dev/configmode.rst
index 9a174d4c..9c0c2430 100644
--- a/docs/dev/configmode.rst
+++ b/docs/dev/configmode.rst
@@ -1,7 +1,8 @@
Config Mode
===========
-As of 2014.4 `gluon-config-mode` consists of several modules.
+The `Config Mode` consists of several modules that provide a range of different
+condiguration options:
gluon-config-mode-core
This modules provides the core functionality for the config mode.
@@ -22,20 +23,13 @@ gluon-config-mode-geo-location
gluon-config-mode-contact-info
Adds a field where the user can provide contact information.
-In order to get a config mode close to the one found in 2014.3.x you may add
-these modules to your `site.mk`:
-gluon-config-mode-hostname,
-gluon-config-mode-autoupdater,
-gluon-config-mode-mesh-vpn,
-gluon-config-mode-geo-location,
-gluon-config-mode-contact-info
-Writing Config Mode Modules
+Writing Config Mode modules
~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Config mode modules are located at `/lib/gluon/config-mode/wizard` and
-`/lib/gluon/config-mode/reboot`. Modules are named like `0000-name.lua` and
-are executed in lexical order. If you take the standard set of modules, the
+Config mode modules are located at ``/lib/gluon/config-mode/wizard`` and
+``/lib/gluon/config-mode/reboot``. Modules are named like ``0000-name.lua`` and
+are executed in lexical order. In the standard package set, the
order is, for wizard modules:
- 0050-autoupdater-info
@@ -44,49 +38,45 @@ order is, for wizard modules:
- 0400-geo-location
- 0500-contact-info
-While for reboot modules it is:
+The reboot module order is:
- 0100-mesh-vpn
- 0900-msg-reboot
+All modules are run in the gluon-web model context and have access to the same
+variables as "full" gluon-web modules.
+
Wizards
-------
-Wizard modules return a UCI section. A simple module capable of changing the
-hostname might look like this::
+Wizard modules must return a function that is provided with the wizard form and an
+UCI cursor. The function can create configuration sections in the form:
- local cbi = require "luci.cbi"
- local uci = luci.model.uci.cursor()
+.. code-block:: lua
- local M = {}
-
- function M.section(form)
- local s = form:section(cbi.SimpleSection, nil, nil)
- local o = s:option(cbi.Value, "_hostname", "Hostname")
- o.value = uci:get_first("system", "system", "hostname")
- o.rmempty = false
+ return function(form, uci)
+ local s = form:section(Section)
+ local o = s:option(Value, "hostname", "Hostname")
+ o.default = uci:get_first("system", "system", "hostname")
o.datatype = "hostname"
+
+ function o:write(data)
+ uci:set("system", uci:get_first("system", "system"), "hostname", data)
+ end
+
+ return {'system'}
end
- function M.handle(data)
- uci:set("system", uci:get_first("system", "system"), "hostname", data._hostname)
- uci:save("system")
- uci:commit("system")
- end
-
- return M
+The function may return a table of UCI packages to commit after the individual
+fields' `write` methods have been executed. This is done to avoid committing the
+packages repeatedly when multiple wizard modules modify the same package.
Reboot page
-----------
-Reboot modules return a function that will be called when the page is to be
-rendered or nil (i.e. the module is skipped)::
+Reboot modules are simply executed when the reboot page is
+rendered:
- if no_hello_world_today then
- return nil
- else
- return function ()
- luci.template.render_string("Hello World!")
- end
- end
+.. code-block:: lua
+ renderer.render_string("Hello World!")
diff --git a/docs/dev/i18n.rst b/docs/dev/i18n.rst
index fb7710ca..1aefb243 100644
--- a/docs/dev/i18n.rst
+++ b/docs/dev/i18n.rst
@@ -10,53 +10,56 @@ General guidelines
nice-to-have, but not required. If you don't know a language well, rather leave the translation
blank, so it is obvious that there is no proper translation yet.
* Existing expert mode packages should be made translatable as soon as possible.
-* The "message IDs" (which are the arguments to the ``translate`` function) should be the
+* The "message IDs" (which are the arguments to the *translate* function) should be the
English texts.
-i18n support in LuCI
---------------------
+i18n support in Gluon
+---------------------
-Internationalization support can be found in the ``luci.i18n`` package.
-Strings are translated using the ``i18n.translate`` and ``i18n.translatef`` functions
-(``translate`` for static strings, ``translatef`` for printf-like formatted string).
+Internationalization support is available in all components (models, view and
+contrllers) of *gluon-web*-based packages. Strings are translated using the *translate*
+and *translatef* functions (*translate* for static strings, *translatef*
+for printf-like formatted string); in views, the special tags ``<%:...%>`` can
+be used to translate the contained string.
-Example from the ``gluon-config-mode-geo-location`` package::
+Example from the *gluon-config-mode-geo-location* package:
- local i18n = require "luci.i18n"
- o = s:option(cbi.Flag, "_location", i18n.translate("Show node on the map"))
+.. code-block:: lua
+
+ local share_location = s:option(Flag, "location", translate("Show node on the map"))
Adding translation templates to Gluon packages
----------------------------------------------
The i18n support is based on the standard gettext system. For each translatable package,
-a translation template with extension ``.pot`` can be created using the ``i18n-scan.pl``
-script from the LuCI repository::
+a translation template with extension ``.pot`` can be created using the *i18n-scan.pl*
+script in the ``contrib`` directory:
- cd package/gluon-config-mode-geo-location
+.. code-block:: sh
+
+ cd package/gluon-web-mesh-vpn-fastd
mkdir i18n
cd i18n
- ../../../packages/luci/build/i18n-scan.pl ../files > gluon-config-mode-geo-location.pot
+ ../../../contrib/i18n-scan.pl ../files ../luasrc > gluon-web-mesh-vpn-fastd.pot
-The entries in the template can be reordered after the generation if desirable. Lots of standard
-translations like "Cancel" are already available in the LuCI base translation file (see
-``packages/luci/po/templates/base.pot``) and can be removed from the template.
+The same command can be run again to update the template.
-In addition, some additions to the Makefile must be made. Instead of OpenWrt's default ``package.mk``,
-the Gluon version ``$(GLUONDIR)/include/package.mk`` must be used. The i18n files must be installed
+In addition, some additions to the Makefile must be made. Instead of LEDE's default *package.mk*,
+the Gluon version (``../gluon.mk`` for core packages) must be used. The i18n files must be installed
and PKG_CONFIG_DEPENDS must be added::
...
- include $(GLUONDIR)/include/package.mk
+ include ../gluon.mk
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
...
define Build/Compile
- $(call GluonBuildI18N,gluon-config-mode-geo-location,i18n)
+ $(call GluonBuildI18N,gluon-web-mesh-vpn-fastd,i18n)
endef
- define Package/gluon-config-mode-geo-location/install
+ define Package/gluon-web-mesh-vpn-fastd/install
...
- $(call GluonInstallI18N,gluon-config-mode-geo-location,$(1))
+ $(call GluonInstallI18N,gluon-web-mesh-vpn-fastd,$(1))
endef
...
@@ -64,29 +67,29 @@ and PKG_CONFIG_DEPENDS must be added::
Adding translations
-------------------
-A new translation file for a template can be added using the ``msginit`` command::
+A new translation file for a template can be added using the *msginit* command:
- cd package/gluon-config-mode-geo-location/i18n
+.. code-block:: sh
+
+ cd package/gluon-web-mesh-vpn-fastd/i18n
msginit -l de
-This will create the file ``de.po`` in which the translations can be added.
+This will create the file *de.po* in which the translations can be added.
-The translation file can be updated to a new template version using the ``msgmerge`` command::
+The translation file can be updated to a new template version using the *msgmerge* command:
- msgmerge -U de.po gluon-config-mode-geo-location.pot
+.. code-block:: sh
+
+ msgmerge -U de.po gluon-web-mesh-vpn-fastd.pot
After the merge, the translation file should be checked for "fuzzy matched" entries where
the original English texts have changed. All entries from the translation file should be
-translated in the ``.po`` file (or removed from it, so the original English texts are displayed
+translated in the *.po* file (or removed from it, so the original English texts are displayed
instead).
Adding support for new languages
--------------------------------
-A list of all languages supported by LuCI can be found in the ``packages/luci/luci.mk`` file after
-Gluon's dependencies have been downloaded using ``make update``. Adding translations for these
-languages is straightforward using the ``msginit`` command.
-
-For other languages, support must be added to LuCI first, which constitutes completely translating
-the ``base.pot``. Please contact the upstream LuCI maintainers at https://github.com/openwrt/luci/
-if you'd like to do this.
+A list of all languages supported by *gluon-web* can be found in ``package/gluon.mk``.
+New languages just need to be added to *GLUON_SUPPORTED_LANGS*, after a human-readable
+language name has been defined in the same file.
diff --git a/docs/dev/upgrade.rst b/docs/dev/upgrade.rst
index 28377235..64dd59ab 100644
--- a/docs/dev/upgrade.rst
+++ b/docs/dev/upgrade.rst
@@ -16,7 +16,7 @@ Best practices
--------------
* Most upgrade scripts are written in Lua. This allows using lots of helper functions provided
- by LuCi and Gluon, e.g. to access the site configuration or edit UCI configuration files.
+ by Gluon, e.g. to access the site configuration or edit UCI configuration files.
* Whenever possible, scripts shouldn't check if they are running for the first time, but just edit configuration
files to achive a valid configuration (without overwriting configuration changes made by the user where desirable).
diff --git a/docs/features/private-wlan.rst b/docs/features/private-wlan.rst
index 343cd5c3..1c46ed76 100644
--- a/docs/features/private-wlan.rst
+++ b/docs/features/private-wlan.rst
@@ -4,7 +4,7 @@ Private WLAN
It is possible to set up a private WLAN that bridges the WAN port and is seperated from the mesh network.
Please note that you should not enable ``mesh_on_wan`` simultaneously.
-The private WLAN can be enabled through the config mode if the package ``gluon-luci-private-wifi`` is installed.
+The private WLAN can be enabled through the config mode if the package ``gluon-web-private-wifi`` is installed.
You may also enable a private WLAN using the command line::
uci set wireless.wan_radio0=wifi-iface
diff --git a/docs/features/roles.rst b/docs/features/roles.rst
index 38d84f85..3af09c01 100644
--- a/docs/features/roles.rst
+++ b/docs/features/roles.rst
@@ -18,13 +18,13 @@ For this the section ``roles`` in ``site.conf`` is needed::
},
},
-The strings to display in the LuCI interface are configured per language in the
+The strings to display in the web interface are configured per language in the
``i18n/en.po``, ``i18n/de.po``, etc. files of the site repository using message IDs like
-``gluon-luci-node-role:role:node`` and ``gluon-luci-node-role:role:backbone``.
+``gluon-web-node-role:role:node`` and ``gluon-web-node-role:role:backbone``.
The value of ``default`` is the role every node will initially own. This value should be part of ``list`` as well.
If you want node owners to change the defined roles via config-mode you can add the package
-``gluon-luci-node-role`` to your ``site.mk``.
+``gluon-web-node-role`` to your ``site.mk``.
The role is saved in ``gluon-node-info.system.role``. To change the role using command line do::
diff --git a/docs/features/wired-mesh.rst b/docs/features/wired-mesh.rst
index 63341f1f..9e28a361 100644
--- a/docs/features/wired-mesh.rst
+++ b/docs/features/wired-mesh.rst
@@ -19,7 +19,7 @@ Configuration
~~~~~~~~~~~~~
Both Mesh-on-WAN and Mesh-on-LAN can be configured on the "Network" page
-of the *Advanced settings* (if the package ``gluon-luci-portconfig`` is installed).
+of the *Advanced settings* (if the package ``gluon-web-network`` is installed).
It is also possible to enable Mesh-on-WAN and Mesh-on-LAN by default by
adding ``mesh_on_wan = true`` and ``mesh_on_lan = true`` to ``site.conf``.
diff --git a/docs/site-example/site.mk b/docs/site-example/site.mk
index 79ecf37a..9298e6f4 100644
--- a/docs/site-example/site.mk
+++ b/docs/site-example/site.mk
@@ -15,10 +15,10 @@ GLUON_SITE_PACKAGES := \
gluon-config-mode-mesh-vpn \
gluon-ebtables-filter-multicast \
gluon-ebtables-filter-ra-dhcp \
- gluon-luci-admin \
- gluon-luci-autoupdater \
- gluon-luci-portconfig \
- gluon-luci-wifi-config \
+ gluon-web-admin \
+ gluon-web-autoupdater \
+ gluon-web-network \
+ gluon-web-wifi-config \
gluon-mesh-batman-adv-15 \
gluon-mesh-vpn-fastd \
gluon-radvd \
diff --git a/docs/user/site.rst b/docs/user/site.rst
index 42ef85c6..021cea21 100644
--- a/docs/user/site.rst
+++ b/docs/user/site.rst
@@ -182,7 +182,7 @@ fastd_mesh_vpn
with the list from the site configuration. Setting `configurable` to `true` will allow the user to
add the method ``null`` to the beginning of the method list or remove ``null`` from it,
and make this change survive updates. Setting `configurable` is necessary for the
- package `gluon-luci-mesh-vpn-fastd`, which adds a UI for this configuration.
+ package `gluon-web-mesh-vpn-fastd`, which adds a UI for this configuration.
In any case, the ``null`` method should always be the first method in the list
if it is supported at all. You should only set `configurable` to `true` if the
@@ -288,11 +288,11 @@ roles \: optional
the community which roles to define. See the section below as an example.
``default`` takes the default role which is set initially. This value should be
part of ``list``. If you want node owners to change the role via config mode add
- the package ``gluon-luci-node-role`` to ``site.mk``.
+ the package ``gluon-web-node-role`` to ``site.mk``.
- The strings to display in the LuCI interface are configured per language in the
+ The strings to display in the web interface are configured per language in the
``i18n/en.po``, ``i18n/de.po``, etc. files of the site repository using message IDs like
- ``gluon-luci-node-role:role:node`` and ``gluon-luci-node-role:role:backbone``.
+ ``gluon-web-node-role:role:node`` and ``gluon-web-node-role:role:backbone``.
::
roles = {
diff --git a/package/gluon-config-mode-autoupdater/Makefile b/package/gluon-config-mode-autoupdater/Makefile
index 2fe1ccb2..a77c07de 100644
--- a/package/gluon-config-mode-autoupdater/Makefile
+++ b/package/gluon-config-mode-autoupdater/Makefile
@@ -13,14 +13,10 @@ PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
define Package/gluon-config-mode-autoupdater
SECTION:=gluon
CATEGORY:=Gluon
- TITLE:=Let the user know whether the autoupdater is enabled or not.
+ TITLE:=Config Mode: Let the user know whether the autoupdater is enabled or not
DEPENDS:=gluon-config-mode-core-virtual +gluon-autoupdater
endef
-define Package/gluon-config-mode-autoupdater/description
- Luci based config mode
-endef
-
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
diff --git a/package/gluon-config-mode-autoupdater/luasrc/lib/gluon/config-mode/wizard/0050-autoupdater-info.lua b/package/gluon-config-mode-autoupdater/luasrc/lib/gluon/config-mode/wizard/0050-autoupdater-info.lua
index e49bd7d7..6d52744e 100644
--- a/package/gluon-config-mode-autoupdater/luasrc/lib/gluon/config-mode/wizard/0050-autoupdater-info.lua
+++ b/package/gluon-config-mode-autoupdater/luasrc/lib/gluon/config-mode/wizard/0050-autoupdater-info.lua
@@ -1,19 +1,8 @@
-local cbi = require "luci.cbi"
-local i18n = require "luci.i18n"
-local uci = require("simple-uci").cursor()
-
-local M = {}
-
-function M.section(form)
- local enabled = uci:get_bool("autoupdater", "settings", "enabled")
- if enabled then
- local s = form:section(cbi.SimpleSection, nil,
- i18n.translate('This node will automatically update its firmware when a new version is available.'))
- end
+return function(form, uci)
+ if uci:get_bool("autoupdater", "settings", "enabled") then
+ local s = form:section(
+ Section, nil,
+ translate('This node will automatically update its firmware when a new version is available.')
+ )
+ end
end
-
-function M.handle(data)
- return
-end
-
-return M
diff --git a/package/gluon-config-mode-contact-info/luasrc/lib/gluon/config-mode/wizard/0500-contact-info.lua b/package/gluon-config-mode-contact-info/luasrc/lib/gluon/config-mode/wizard/0500-contact-info.lua
index 94d5f00c..1ef5deaf 100644
--- a/package/gluon-config-mode-contact-info/luasrc/lib/gluon/config-mode/wizard/0500-contact-info.lua
+++ b/package/gluon-config-mode-contact-info/luasrc/lib/gluon/config-mode/wizard/0500-contact-info.lua
@@ -1,35 +1,27 @@
-local cbi = require "luci.cbi"
-local i18n = require "luci.i18n"
-local uci = require("simple-uci").cursor()
-local site = require 'gluon.site_config'
+return function(form, uci)
+ local site = require 'gluon.site_config'
-local M = {}
+ local owner = uci:get_first("gluon-node-info", "owner")
-function M.section(form)
- local s = form:section(cbi.SimpleSection, nil, i18n.translate(
- 'Please provide your contact information here to '
- .. 'allow others to contact you. Note that '
- .. 'this information will be visible publicly '
- .. 'on the internet together with your node\'s coordinates.'
- )
- )
+ local s = form:section(Section, nil, translate(
+ 'Please provide your contact information here to '
+ .. 'allow others to contact you. Note that '
+ .. 'this information will be visible publicly '
+ .. 'on the internet together with your node\'s coordinates.'
+ ))
- local o = s:option(cbi.Value, "_contact", i18n.translate("Contact info"))
- o.default = uci:get_first("gluon-node-info", "owner", "contact", "")
- o.rmempty = not ((site.config_mode or {}).owner or {}).obligatory
- o.datatype = "string"
- o.description = i18n.translate("e.g. E-mail or phone number")
- o.maxlen = 140
+ local o = s:option(Value, "contact", translate("Contact info"), translate("e.g. E-mail or phone number"))
+ o.default = uci:get("gluon-node-info", owner, "contact")
+ o.optional = not ((site.config_mode or {}).owner or {}).obligatory
+ -- without a minimal length, an empty string will be accepted even with "optional = false"
+ o.datatype = "minlength(1)"
+ function o:write(data)
+ if data then
+ uci:set("gluon-node-info", owner, "contact", data)
+ else
+ uci:delete("gluon-node-info", owner, "contact")
+ end
+ end
+
+ return {'gluon-node-info'}
end
-
-function M.handle(data)
- if data._contact ~= nil then
- uci:set("gluon-node-info", uci:get_first("gluon-node-info", "owner"), "contact", data._contact)
- else
- uci:delete("gluon-node-info", uci:get_first("gluon-node-info", "owner"), "contact")
- end
- uci:save("gluon-node-info")
- uci:commit("gluon-node-info")
-end
-
-return M
diff --git a/package/gluon-config-mode-core/Makefile b/package/gluon-config-mode-core/Makefile
index d629c265..91b2e51f 100644
--- a/package/gluon-config-mode-core/Makefile
+++ b/package/gluon-config-mode-core/Makefile
@@ -16,8 +16,8 @@ PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
define Package/gluon-config-mode-core
SECTION:=gluon
CATEGORY:=Gluon
- TITLE:=Luci based config mode for user friendly setup of new mesh nodes
- DEPENDS:=gluon-setup-mode-virtual +gluon-luci-theme +gluon-lock-password +pretty-hostname $(GLUON_I18N_PACKAGES)
+ TITLE:=Configuration wizard for user friendly setup of new mesh nodes
+ DEPENDS:=gluon-setup-mode-virtual +gluon-web-theme +gluon-lock-password +pretty-hostname
PROVIDES:=gluon-config-mode-core-virtual
endef
diff --git a/package/gluon-config-mode-core/files/lib/gluon/web/view/gluon/config-mode/reboot.html b/package/gluon-config-mode-core/files/lib/gluon/web/view/gluon/config-mode/reboot.html
new file mode 100644
index 00000000..6c65010b
--- /dev/null
+++ b/package/gluon-config-mode-core/files/lib/gluon/web/view/gluon/config-mode/reboot.html
@@ -0,0 +1,22 @@
+
<%:Your node's setup is now complete.%>
+<%
+ local fs = require "nixio.fs"
+ local util = require "nixio.util"
+
+ local parts_dir = "/lib/gluon/config-mode/reboot/"
+ local files = util.consume(fs.dir(parts_dir) or function() end)
+ table.sort(files)
+
+ local parts = {}
+ for _, entry in ipairs(files) do
+ if entry:sub(1, 1) ~= '.' then
+ local p = assert(loadfile(parts_dir .. entry))
+ setfenv(p, getfenv())
+ table.insert(parts, p)
+ end
+ end
+
+ for _, p in ipairs(parts) do
+ p()
+ end
+%>
diff --git a/package/gluon-config-mode-core/files/lib/gluon/web/view/gluon/config-mode/welcome.html b/package/gluon-config-mode-core/files/lib/gluon/web/view/gluon/config-mode/welcome.html
new file mode 100644
index 00000000..b2b8e577
--- /dev/null
+++ b/package/gluon-config-mode-core/files/lib/gluon/web/view/gluon/config-mode/welcome.html
@@ -0,0 +1,11 @@
+<%-
+ local sysconfig = require 'gluon.sysconfig'
+-%>
+
-
-<% if not self.embedded then %>
-
-<% end %>
diff --git a/package/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon/config-mode/reboot.htm b/package/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon/config-mode/reboot.htm
deleted file mode 100644
index 25ad20bf..00000000
--- a/package/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon/config-mode/reboot.htm
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
- <%=escape(hostname)%> is rebooting
-
-
-
-
-
-
<%:Your node's setup is now complete.%>
- <% for k, v in ipairs(parts) do v() end %>
-
-
-
-
diff --git a/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/reboot/0900-msg-reboot.lua b/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/reboot/0900-msg-reboot.lua
index 0e2a7e25..94ca3c0d 100644
--- a/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/reboot/0900-msg-reboot.lua
+++ b/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/reboot/0900-msg-reboot.lua
@@ -1,6 +1,4 @@
-local i18n = require 'luci.i18n'
local site = require 'gluon.site_config'
-local gluon_luci = require 'gluon.luci'
local sysconfig = require 'gluon.sysconfig'
local pretty_hostname = require 'pretty_hostname'
@@ -9,15 +7,11 @@ local uci = require("simple-uci").cursor()
local hostname = pretty_hostname.get(uci)
local contact = uci:get_first('gluon-node-info', 'owner', 'contact')
-local msg = i18n.translate('gluon-config-mode:reboot')
+local msg = translate('gluon-config-mode:reboot')
-return function ()
- luci.template.render_string(msg, {
- hostname = hostname,
- site = site,
- sysconfig = sysconfig,
- contact = contact,
- escape = gluon_luci.escape,
- urlescape = gluon_luci.urlescape,
- })
-end
+renderer.render_string(msg, {
+ hostname = hostname,
+ site = site,
+ sysconfig = sysconfig,
+ contact = contact,
+})
diff --git a/package/gluon-config-mode-core/luasrc/lib/gluon/web/controller/gluon-config-mode/index.lua b/package/gluon-config-mode-core/luasrc/lib/gluon/web/controller/gluon-config-mode/index.lua
new file mode 100644
index 00000000..52117ac8
--- /dev/null
+++ b/package/gluon-config-mode-core/luasrc/lib/gluon/web/controller/gluon-config-mode/index.lua
@@ -0,0 +1,2 @@
+entry({}, alias("wizard"))
+entry({"wizard"}, model("gluon-config-mode/wizard"), _("Wizard"), 5)
diff --git a/package/gluon-config-mode-core/luasrc/lib/gluon/web/model/gluon-config-mode/wizard.lua b/package/gluon-config-mode-core/luasrc/lib/gluon/web/model/gluon-config-mode/wizard.lua
new file mode 100644
index 00000000..6cafb0e2
--- /dev/null
+++ b/package/gluon-config-mode-core/luasrc/lib/gluon/web/model/gluon-config-mode/wizard.lua
@@ -0,0 +1,64 @@
+local disp = require 'gluon.web.dispatcher'
+local fs = require "nixio.fs"
+local util = require "gluon.web.util"
+local nixio_util = require "nixio.util"
+
+local uci = require("simple-uci").cursor()
+
+local wizard_dir = "/lib/gluon/config-mode/wizard/"
+
+local files = nixio_util.consume(fs.dir(wizard_dir) or function() end)
+table.sort(files)
+
+local wizard = {}
+for _, entry in ipairs(files) do
+ if entry:sub(1, 1) ~= '.' then
+ local f = assert(loadfile(wizard_dir .. entry))
+ setfenv(f, getfenv())
+ local w = f()
+ table.insert(wizard, w)
+ end
+end
+
+local f = Form(translate("Welcome!"))
+f.submit = translate('Save & restart')
+f.reset = false
+
+local s = f:section(Section)
+s.template = "gluon/config-mode/welcome"
+
+local commit = {'gluon-setup-mode'}
+
+for _, w in ipairs(wizard) do
+ for _, c in ipairs(w(f, uci) or {}) do
+ if not util.contains(commit, c) then
+ table.insert(commit, c)
+ end
+ end
+end
+
+function f:write()
+ local nixio = require "nixio"
+
+ uci:set("gluon-setup-mode", uci:get_first("gluon-setup-mode", "setup_mode"), "configured", true)
+
+ for _, c in ipairs(commit) do
+ uci:commit(c)
+ end
+
+ f.template = "gluon/config-mode/reboot"
+ f.hidenav = true
+
+ if nixio.fork() == 0 then
+ -- Replace stdout with /dev/null
+ nixio.dup(nixio.open('/dev/null', 'w'), nixio.stdout)
+
+ -- Sleep a little so the browser can fetch everything required to
+ -- display the reboot page, then reboot the device.
+ nixio.nanosleep(1)
+
+ nixio.execp("reboot")
+ end
+end
+
+return f
diff --git a/package/gluon-config-mode-core/luasrc/usr/lib/lua/luci/controller/gluon-config-mode/index.lua b/package/gluon-config-mode-core/luasrc/usr/lib/lua/luci/controller/gluon-config-mode/index.lua
deleted file mode 100644
index 4e1f5232..00000000
--- a/package/gluon-config-mode-core/luasrc/usr/lib/lua/luci/controller/gluon-config-mode/index.lua
+++ /dev/null
@@ -1,93 +0,0 @@
---[[
-Copyright 2013 Nils Schneider
-
-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$
-]]--
-
-module("luci.controller.gluon-config-mode.index", package.seeall)
-
-function index()
- local uci_state = luci.model.uci.cursor_state()
-
- if uci_state:get_first("gluon-setup-mode", "setup_mode", "running", "0") == "1" then
- local root = node()
- if not root.target then
- root.target = alias("gluon-config-mode")
- root.index = true
- end
-
- page = node()
- page.lock = true
- page.target = alias("gluon-config-mode")
- page.subindex = true
- page.index = false
-
- page = node("gluon-config-mode")
- page.title = _("Wizard")
- page.target = alias("gluon-config-mode", "wizard")
- page.order = 5
- page.sysauth = "root"
- page.sysauth_authenticator = function() return "root" end
- page.index = true
-
- entry({"gluon-config-mode", "wizard"}, cbi("gluon-config-mode/wizard")).index = true
- entry({"gluon-config-mode", "reboot"}, call("action_reboot"))
- end
-end
-
-function action_reboot()
- local uci = luci.model.uci.cursor()
-
- uci:set("gluon-setup-mode", uci:get_first("gluon-setup-mode", "setup_mode"), "configured", "1")
- uci:save("gluon-setup-mode")
- uci:commit("gluon-setup-mode")
-
- local gluon_luci = require "gluon.luci"
- local fs = require "nixio.fs"
- local util = require "nixio.util"
- local pretty_hostname = require "pretty_hostname"
-
- local parts_dir = "/lib/gluon/config-mode/reboot/"
- local files = util.consume(fs.dir(parts_dir))
-
- table.sort(files)
-
- local parts = {}
-
- for _, entry in ipairs(files) do
- if entry:sub(1, 1) ~= '.' then
- local f = dofile(parts_dir .. '/' .. entry)
- if f ~= nil then
- table.insert(parts, f)
- end
- end
- end
-
- local hostname = pretty_hostname.get(uci)
-
- luci.template.render("gluon/config-mode/reboot",
- {
- parts = parts,
- hostname = hostname,
- escape = gluon_luci.escape,
- urlescape = gluon_luci.urlescape,
- }
- )
-
- if nixio.fork() == 0 then
- -- Replace stdout with /dev/null
- nixio.dup(nixio.open('/dev/null', 'w'), nixio.stdout)
-
- -- Sleep a little so the browser can fetch everything required to
- -- display the reboot page, then reboot the device.
- nixio.nanosleep(1)
-
- nixio.execp("reboot")
- end
-end
diff --git a/package/gluon-config-mode-core/luasrc/usr/lib/lua/luci/model/cbi/gluon-config-mode/wizard.lua b/package/gluon-config-mode-core/luasrc/usr/lib/lua/luci/model/cbi/gluon-config-mode/wizard.lua
deleted file mode 100644
index b5dbe0af..00000000
--- a/package/gluon-config-mode-core/luasrc/usr/lib/lua/luci/model/cbi/gluon-config-mode/wizard.lua
+++ /dev/null
@@ -1,42 +0,0 @@
-local wizard_dir = "/lib/gluon/config-mode/wizard/"
-local i18n = luci.i18n
-local uci = require("simple-uci").cursor()
-local fs = require "nixio.fs"
-local util = require "nixio.util"
-local f, s
-
-local wizard = {}
-local files = {}
-
-if fs.access(wizard_dir) then
- files = util.consume(fs.dir(wizard_dir))
- table.sort(files)
-end
-
-for _, entry in ipairs(files) do
- if entry:sub(1, 1) ~= '.' then
- table.insert(wizard, dofile(wizard_dir .. '/' .. entry))
- end
-end
-
-f = SimpleForm("wizard")
-f.reset = false
-f.template = "gluon/cbi/config-mode"
-
-for _, s in ipairs(wizard) do
- s.section(f)
-end
-
-function f.handle(self, state, data)
- if state == FORM_VALID then
- for _, s in ipairs(wizard) do
- s.handle(data)
- end
-
- luci.http.redirect(luci.dispatcher.build_url("gluon-config-mode", "reboot"))
- end
-
- return true
-end
-
-return f
diff --git a/package/gluon-config-mode-geo-location/luasrc/lib/gluon/config-mode/wizard/0400-geo-location.lua b/package/gluon-config-mode-geo-location/luasrc/lib/gluon/config-mode/wizard/0400-geo-location.lua
index 6821da59..4d7fec01 100644
--- a/package/gluon-config-mode-geo-location/luasrc/lib/gluon/config-mode/wizard/0400-geo-location.lua
+++ b/package/gluon-config-mode-geo-location/luasrc/lib/gluon/config-mode/wizard/0400-geo-location.lua
@@ -1,75 +1,64 @@
-local cbi = require "luci.cbi"
-local i18n = require "luci.i18n"
-local uci = require("simple-uci").cursor()
-local site = require 'gluon.site_config'
+return function(form, uci)
+ local site = require 'gluon.site_config'
-local M = {}
+ local location = uci:get_first("gluon-node-info", "location")
-local function show_altitude()
- if ((site.config_mode or {}).geo_location or {}).show_altitude ~= false then
- return true
- end
- if uci:get_first("gluon-node-info", "location", "altitude") then
- return true
- end
- return false
+ local function show_altitude()
+ if ((site.config_mode or {}).geo_location or {}).show_altitude ~= false then
+ return true
+ end
+
+ return uci:get_bool("gluon-node-info", location, "altitude")
+ end
+
+ local text = translate(
+ 'If you want the location of your node to ' ..
+ 'be displayed on the map, you can enter its coordinates here.'
+ )
+ if show_altitude() then
+ text = text .. ' ' .. translate("gluon-config-mode:altitude-help")
+ end
+
+ local s = form:section(Section, nil, text)
+
+ local o
+
+ local share_location = s:option(Flag, "location", translate("Show node on the map"))
+ share_location.default = uci:get_bool("gluon-node-info", location, "share_location")
+ function share_location:write(data)
+ uci:set("gluon-node-info", location, "share_location", data)
+ end
+
+ o = s:option(Value, "latitude", translate("Latitude"), translatef("e.g. %s", "53.873621"))
+ o.default = uci:get("gluon-node-info", location, "latitude")
+ o:depends(share_location, true)
+ o.datatype = "float"
+ function o:write(data)
+ uci:set("gluon-node-info", location, "latitude", data)
+ end
+
+ o = s:option(Value, "longitude", translate("Longitude"), translatef("e.g. %s", "10.689901"))
+ o.default = uci:get("gluon-node-info", location, "longitude")
+ o:depends(share_location, true)
+ o.datatype = "float"
+ function o:write(data)
+ uci:set("gluon-node-info", location, "longitude", data)
+ end
+
+ if show_altitude() then
+ o = s:option(Value, "altitude", translate("gluon-config-mode:altitude-label"), translatef("e.g. %s", "11.51"))
+ o.default = uci:get("gluon-node-info", location, "altitude")
+ o:depends(share_location, true)
+ o.datatype = "float"
+ o.optional = true
+ function o:write(data)
+ if data then
+ uci:set("gluon-node-info", location, "altitude", data)
+ else
+ uci:delete("gluon-node-info", location, "altitude")
+ end
+ end
+ end
+
+ return {'gluon-node-info'}
end
-
-function M.section(form)
- local text = i18n.translate('If you want the location of your node to '
- .. 'be displayed on the map, you can enter its coordinates here.')
- if show_altitude() then
- text = text .. ' ' .. i18n.translate("gluon-config-mode:altitude-help")
- end
- local s = form:section(cbi.SimpleSection, nil, text)
-
-
- local o
-
- o = s:option(cbi.Flag, "_location", i18n.translate("Show node on the map"))
- o.default = uci:get_first("gluon-node-info", "location", "share_location", o.disabled)
- o.rmempty = false
-
- o = s:option(cbi.Value, "_latitude", i18n.translate("Latitude"))
- o.default = uci:get_first("gluon-node-info", "location", "latitude")
- o:depends("_location", "1")
- o.rmempty = false
- o.datatype = "float"
- o.description = i18n.translatef("e.g. %s", "53.873621")
-
- o = s:option(cbi.Value, "_longitude", i18n.translate("Longitude"))
- o.default = uci:get_first("gluon-node-info", "location", "longitude")
- o:depends("_location", "1")
- o.rmempty = false
- o.datatype = "float"
- o.description = i18n.translatef("e.g. %s", "10.689901")
-
- if show_altitude() then
- o = s:option(cbi.Value, "_altitude", i18n.translate("gluon-config-mode:altitude-label"))
- o.default = uci:get_first("gluon-node-info", "location", "altitude")
- o:depends("_location", "1")
- o.rmempty = true
- o.datatype = "float"
- o.description = i18n.translatef("e.g. %s", "11.51")
- end
-
-end
-
-function M.handle(data)
- local sname = uci:get_first("gluon-node-info", "location")
-
- uci:set("gluon-node-info", sname, "share_location", data._location)
- if data._location and data._latitude ~= nil and data._longitude ~= nil then
- uci:set("gluon-node-info", sname, "latitude", data._latitude:trim())
- uci:set("gluon-node-info", sname, "longitude", data._longitude:trim())
- if data._altitude ~= nil then
- uci:set("gluon-node-info", sname, "altitude", data._altitude:trim())
- else
- uci:delete("gluon-node-info", sname, "altitude")
- end
- end
- uci:save("gluon-node-info")
- uci:commit("gluon-node-info")
-end
-
-return M
diff --git a/package/gluon-config-mode-hostname/luasrc/lib/gluon/config-mode/wizard/0100-hostname.lua b/package/gluon-config-mode-hostname/luasrc/lib/gluon/config-mode/wizard/0100-hostname.lua
index 0f7d0b2c..8661d4bd 100644
--- a/package/gluon-config-mode-hostname/luasrc/lib/gluon/config-mode/wizard/0100-hostname.lua
+++ b/package/gluon-config-mode-hostname/luasrc/lib/gluon/config-mode/wizard/0100-hostname.lua
@@ -1,20 +1,13 @@
-local cbi = require "luci.cbi"
-local i18n = require "luci.i18n"
-local pretty_hostname = require "pretty_hostname"
-local uci = require("simple-uci").cursor()
+return function(form, uci)
+ local pretty_hostname = require "pretty_hostname"
-local M = {}
+ local s = form:section(Section)
+ local o = s:option(Value, "hostname", translate("Node name"))
+ o.default = pretty_hostname.get(uci)
-function M.section(form)
- local s = form:section(cbi.SimpleSection, nil, nil)
- local o = s:option(cbi.Value, "_hostname", i18n.translate("Node name"))
- o.value = pretty_hostname.get(uci)
- o.rmempty = false
+ function o:write(data)
+ pretty_hostname.set(uci, data)
+ end
+
+ return {'system'}
end
-
-function M.handle(data)
- pretty_hostname.set(uci, data._hostname)
- uci:commit("system")
-end
-
-return M
diff --git a/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/reboot/0100-mesh-vpn.lua b/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/reboot/0100-mesh-vpn.lua
index f68d230e..f5868c60 100644
--- a/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/reboot/0100-mesh-vpn.lua
+++ b/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/reboot/0100-mesh-vpn.lua
@@ -2,32 +2,27 @@ local uci = require("simple-uci").cursor()
local meshvpn_enabled = uci:get_bool("fastd", "mesh_vpn", "enabled")
if not meshvpn_enabled then
- return nil
-else
- local i18n = require "luci.i18n"
- local util = require "luci.util"
-
- local gluon_luci = require 'gluon.luci'
- local site = require 'gluon.site_config'
- local sysconfig = require 'gluon.sysconfig'
-
- local pretty_hostname = require 'pretty_hostname'
-
- local pubkey = util.trim(util.exec("/etc/init.d/fastd show_key " .. "mesh_vpn"))
- local hostname = pretty_hostname.get(uci)
- local contact = uci:get_first("gluon-node-info", "owner", "contact")
-
- local msg = i18n.translate('gluon-config-mode:pubkey')
-
- return function ()
- luci.template.render_string(msg, {
- pubkey = pubkey,
- hostname = hostname,
- site = site,
- sysconfig = sysconfig,
- contact = contact,
- escape = gluon_luci.escape,
- urlescape = gluon_luci.urlescape,
- })
- end
+ return
end
+
+local lutil = require "gluon.web.util"
+
+local site = require 'gluon.site_config'
+local sysconfig = require 'gluon.sysconfig'
+local util = require "gluon.util"
+
+local pretty_hostname = require 'pretty_hostname'
+
+local pubkey = util.trim(lutil.exec("/etc/init.d/fastd show_key mesh_vpn"))
+local hostname = pretty_hostname.get(uci)
+local contact = uci:get_first("gluon-node-info", "owner", "contact")
+
+local msg = translate('gluon-config-mode:pubkey')
+
+renderer.render_string(msg, {
+ pubkey = pubkey,
+ hostname = hostname,
+ site = site,
+ sysconfig = sysconfig,
+ contact = contact,
+})
diff --git a/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua b/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua
index 87109f37..6aa4ee52 100644
--- a/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua
+++ b/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua
@@ -1,64 +1,47 @@
-local cbi = require "luci.cbi"
-local i18n = require "luci.i18n"
-local uci = require("simple-uci").cursor()
+return function(form, uci)
+ local msg = translate(
+ 'Your internet connection can be used to establish an ' ..
+ 'encrypted connection with other nodes. ' ..
+ 'Enable this option if there are no other nodes reachable ' ..
+ 'over WLAN in your vicinity or you want to make a part of ' ..
+ 'your connection\'s bandwidth available for the network. You can limit how ' ..
+ 'much bandwidth the node will use at most.'
+ )
-local M = {}
+ local s = form:section(Section, nil, msg)
-function M.section(form)
- local msg = i18n.translate('Your internet connection can be used to establish an ' ..
- 'encrypted connection with other nodes. ' ..
- 'Enable this option if there are no other nodes reachable ' ..
- 'over WLAN in your vicinity or you want to make a part of ' ..
- 'your connection\'s bandwidth available for the network. You can limit how ' ..
- 'much bandwidth the node will use at most.')
- local s = form:section(cbi.SimpleSection, nil, msg)
+ local o
- local o
+ local meshvpn = s:option(Flag, "meshvpn", translate("Use internet connection (mesh VPN)"))
+ meshvpn.default = uci:get_bool("fastd", "mesh_vpn", "enabled")
+ function meshvpn:write(data)
+ uci:set("fastd", "mesh_vpn", "enabled", data)
+ end
- o = s:option(cbi.Flag, "_meshvpn", i18n.translate("Use internet connection (mesh VPN)"))
- o.default = uci:get_bool("fastd", "mesh_vpn", "enabled") and o.enabled or o.disabled
- o.rmempty = false
+ local limit = s:option(Flag, "limit_enabled", translate("Limit bandwidth"))
+ limit:depends(meshvpn, true)
+ limit.default = uci:get_bool("simple-tc", "mesh_vpn", "enabled")
+ function limit:write(data)
+ uci:set("simple-tc", "mesh_vpn", "interface")
+ uci:set("simple-tc", "mesh_vpn", "enabled", data)
+ uci:set("simple-tc", "mesh_vpn", "ifname", "mesh-vpn")
+ end
- o = s:option(cbi.Flag, "_limit_enabled", i18n.translate("Limit bandwidth"))
- o:depends("_meshvpn", "1")
- o.default = uci:get_bool("simple-tc", "mesh_vpn", "enabled") and o.enabled or o.disabled
- o.rmempty = false
+ o = s:option(Value, "limit_ingress", translate("Downstream (kbit/s)"))
+ o:depends(limit, true)
+ o.default = uci:get("simple-tc", "mesh_vpn", "limit_ingress")
+ o.datatype = "uinteger"
+ function o:write(data)
+ uci:set("simple-tc", "mesh_vpn", "limit_ingress", data)
+ end
- o = s:option(cbi.Value, "_limit_ingress", i18n.translate("Downstream (kbit/s)"))
- o:depends("_limit_enabled", "1")
- o.value = uci:get("simple-tc", "mesh_vpn", "limit_ingress")
- o.rmempty = false
- o.datatype = "uinteger"
+ o = s:option(Value, "limit_egress", translate("Upstream (kbit/s)"))
+ o:depends(limit, true)
+ o.default = uci:get("simple-tc", "mesh_vpn", "limit_egress")
+ o.datatype = "uinteger"
+ function o:write(data)
+ uci:set("simple-tc", "mesh_vpn", "limit_egress", data)
+ end
- o = s:option(cbi.Value, "_limit_egress", i18n.translate("Upstream (kbit/s)"))
- o:depends("_limit_enabled", "1")
- o.value = uci:get("simple-tc", "mesh_vpn", "limit_egress")
- o.rmempty = false
- o.datatype = "uinteger"
+ return {'fastd', 'simple-tc'}
end
-
-function M.handle(data)
- uci:set("fastd", "mesh_vpn", "enabled", data._meshvpn)
- uci:save("fastd")
- uci:commit("fastd")
-
- -- checks for nil needed due to o:depends(...)
- if data._limit_enabled ~= nil then
- uci:set("simple-tc", "mesh_vpn", "interface")
- uci:set("simple-tc", "mesh_vpn", "enabled", data._limit_enabled)
- uci:set("simple-tc", "mesh_vpn", "ifname", "mesh-vpn")
-
- if data._limit_ingress ~= nil then
- uci:set("simple-tc", "mesh_vpn", "limit_ingress", data._limit_ingress:trim())
- end
-
- if data._limit_egress ~= nil then
- uci:set("simple-tc", "mesh_vpn", "limit_egress", data._limit_egress:trim())
- end
-
- uci:save("simple-tc")
- uci:commit("simple-tc")
- end
-end
-
-return M
diff --git a/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade_reboot.htm b/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade_reboot.htm
deleted file mode 100644
index 3e89e778..00000000
--- a/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade_reboot.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
- <%:Upgrading firmware%>
-
-
-
-
-
-
- <%:The firmware is currently being upgraded.%>
- <%:Don't switch off the device in any circumstance!%>
- <%:The upgrade will take a few minutes. When it is finished, your node will reboot automatically.%>
-
-
-
-
-
diff --git a/package/gluon-luci-admin/luasrc/usr/lib/lua/luci/controller/admin/index.lua b/package/gluon-luci-admin/luasrc/usr/lib/lua/luci/controller/admin/index.lua
deleted file mode 100644
index 5a468f16..00000000
--- a/package/gluon-luci-admin/luasrc/usr/lib/lua/luci/controller/admin/index.lua
+++ /dev/null
@@ -1,39 +0,0 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2008 Steven Barth
-Copyright 2008 Jo-Philipp Wich
-
-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$
-]]--
-
-module("luci.controller.admin.index", package.seeall)
-
-function index()
- local uci_state = luci.model.uci.cursor_state()
-
- -- Disable gluon-luci-admin when setup mode is not enabled
- if uci_state:get_first('gluon-setup-mode', 'setup_mode', 'running', '0') ~= '1' then
- return
- end
-
- local root = node()
- if not root.lock then
- root.target = alias("admin")
- root.index = true
- end
-
- local page = entry({"admin"}, alias("admin", "index"), _("Advanced settings"), 10)
- page.sysauth = "root"
- page.sysauth_authenticator = function() return "root" end
- page.index = true
-
- entry({"admin", "index"}, template("admin/info"), _("Information"), 1)
- entry({"admin", "remote"}, cbi("admin/remote"), _("Remote access"), 10)
-end
diff --git a/package/gluon-luci-admin/luasrc/usr/lib/lua/luci/controller/admin/upgrade.lua b/package/gluon-luci-admin/luasrc/usr/lib/lua/luci/controller/admin/upgrade.lua
deleted file mode 100644
index 1930e9ec..00000000
--- a/package/gluon-luci-admin/luasrc/usr/lib/lua/luci/controller/admin/upgrade.lua
+++ /dev/null
@@ -1,139 +0,0 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2008 Steven Barth
-Copyright 2008 Jo-Philipp Wich
-
-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$
-]]--
-
-module("luci.controller.admin.upgrade", package.seeall)
-
-function index()
- local has_platform = nixio.fs.access("/lib/upgrade/platform.sh")
- if has_platform then
- entry({"admin", "upgrade"}, call("action_upgrade"), _("Upgrade firmware"), 90)
- entry({"admin", "upgrade", "reboot"}, template("admin/upgrade_reboot"), nil, nil)
- end
-end
-
-function action_upgrade()
- local tmpfile = "/tmp/firmware.img"
-
- -- Install upload handler
- local file
- luci.http.setfilehandler(
- function(meta, chunk, eof)
- if not nixio.fs.access(tmpfile) and not file and chunk and #chunk > 0 then
- file = io.open(tmpfile, "w")
- end
- if file and chunk then
- file:write(chunk)
- end
- if file and eof then
- file:close()
- end
- end
- )
-
- -- Determine state
- local step = tonumber(luci.http.formvalue("step") or 1)
-
- if step ~= 1 and not luci.dispatcher.test_post_security() then
- nixio.fs.unlink(tmpfile)
- return
- end
-
- local has_image = nixio.fs.access(tmpfile)
- local has_support = image_supported(tmpfile)
-
- -- Step 1: file upload, error on unsupported image format
- if not has_image or not has_support or step == 1 then
- -- If there is an image but user has requested step 1
- -- or type is not supported, then remove it.
- if has_image then
- nixio.fs.unlink(tmpfile)
- end
-
- luci.template.render("admin/upgrade", {
- bad_image=(has_image and not has_support or false)
- } )
-
- -- Step 2: present uploaded file, show checksum, confirmation
- elseif step == 2 then
- luci.template.render("admin/upgrade_confirm", {
- checksum=image_checksum(tmpfile),
- filesize=nixio.fs.stat(tmpfile).size,
- flashsize=storage_size(),
- keepconfig=luci.http.formvalue("keepcfg") == "1"
- } )
- elseif step == 3 then
- local keepcfg = luci.http.formvalue("keepcfg") == "1"
- fork_exec("/sbin/sysupgrade %s %q" % { keepcfg and "" or "-n", tmpfile })
- luci.http.redirect(luci.dispatcher.build_url("admin", "upgrade", "reboot"))
- end
-end
-
-function fork_exec(command)
- local pid = nixio.fork()
- if pid > 0 then
- return
- elseif pid == 0 then
- -- change to root dir
- nixio.chdir("/")
-
- -- patch stdin, out, err to /dev/null
- local null = nixio.open("/dev/null", "w+")
- if null then
- nixio.dup(null, nixio.stderr)
- nixio.dup(null, nixio.stdout)
- nixio.dup(null, nixio.stdin)
- if null:fileno() > 2 then
- null:close()
- end
- end
-
- -- replace with target command
- nixio.exec("/bin/sh", "-c", command)
- end
-end
-
-function image_supported(tmpfile)
- -- XXX: yay...
- return ( 0 == os.execute(
- "/sbin/sysupgrade -T %q >/dev/null"
- % tmpfile
- ) )
-end
-
-function storage_size()
- local size = 0
- if nixio.fs.access("/proc/mtd") then
- for l in io.lines("/proc/mtd") do
- local d, s, e, n = l:match('^([^%s]+)%s+([^%s]+)%s+([^%s]+)%s+"([^%s]+)"')
- if n == "linux" then
- size = tonumber(s, 16)
- break
- end
- end
- elseif nixio.fs.access("/proc/partitions") then
- for l in io.lines("/proc/partitions") do
- local x, y, b, n = l:match('^%s*(%d+)%s+(%d+)%s+([^%s]+)%s+([^%s]+)')
- if b and n and not n:match('[0-9]') then
- size = tonumber(b) * 1024
- break
- end
- end
- end
- return size
-end
-
-function image_checksum(tmpfile)
- return (luci.sys.exec("md5sum %q" % tmpfile):match("^([^%s]+)"))
-end
diff --git a/package/gluon-luci-admin/luasrc/usr/lib/lua/luci/model/cbi/admin/remote.lua b/package/gluon-luci-admin/luasrc/usr/lib/lua/luci/model/cbi/admin/remote.lua
deleted file mode 100644
index 796482ba..00000000
--- a/package/gluon-luci-admin/luasrc/usr/lib/lua/luci/model/cbi/admin/remote.lua
+++ /dev/null
@@ -1,87 +0,0 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2008 Steven Barth
-Copyright 2011 Jo-Philipp Wich
-Copyright 2013 Nils Schneider
-
-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$
-]]--
-
-local fs = require "nixio.fs"
-
-local f_keys = SimpleForm('keys', translate("SSH keys"), translate("You can provide your SSH keys here (one per line):"))
-f_keys.hidden = { submit_keys = '1' }
-
-local keys
-
-keys = f_keys:field(TextValue, "keys", "")
-keys.wrap = "off"
-keys.rows = 5
-keys.rmempty = true
-
-function keys.cfgvalue()
- return fs.readfile("/etc/dropbear/authorized_keys") or ""
-end
-
-function keys.write(self, section, value)
- if not f_keys:formvalue('submit_keys') then return end
-
- fs.writefile("/etc/dropbear/authorized_keys", value:gsub("\r\n", "\n"):trim() .. "\n")
-end
-
-function keys.remove(self, section)
- if not f_keys:formvalue('submit_keys') then return end
-
- fs.remove("/etc/dropbear/authorized_keys")
-end
-
-local f_password = SimpleForm('password', translate("Password"),
- translate(
- "Alternatively, you can set a password to access you node. Please choose a secure password you don't use anywhere else.
"
- .. "If you set an empty password, login via password will be disabled. This is the default."
- )
-)
-f_password.hidden = { submit_password = '1' }
-f_password.reset = false
-
-local pw1 = f_password:field(Value, "pw1", translate("Password"))
-pw1.password = true
-function pw1.cfgvalue()
- return ''
-end
-
-local pw2 = f_password:field(Value, "pw2", translate("Confirmation"))
-pw2.password = true
-function pw2.cfgvalue()
- return ''
-end
-
-function f_password:handle(state, data)
- if not f_password:formvalue('submit_password') then return end
-
- if data.pw1 ~= data.pw2 then
- f_password.errmessage = translate("The password and the confirmation differ.")
- return
- end
-
- if data.pw1 and #data.pw1 > 0 then
- if luci.sys.user.setpasswd('root', data.pw1) == 0 then
- f_password.message = translate("Password changed.")
- else
- f_password.errmessage = translate("Unable to change the password.")
- end
- else
- -- We don't check the return code here as the error 'password for root is already locked' is normal...
- os.execute('passwd -l root >/dev/null')
- f_password.message = translate("Password removed.")
- end
-end
-
-return f_keys, f_password
diff --git a/package/gluon-luci-autoupdater/luasrc/usr/lib/lua/luci/controller/admin/autoupdater.lua b/package/gluon-luci-autoupdater/luasrc/usr/lib/lua/luci/controller/admin/autoupdater.lua
deleted file mode 100644
index 64e1acbd..00000000
--- a/package/gluon-luci-autoupdater/luasrc/usr/lib/lua/luci/controller/admin/autoupdater.lua
+++ /dev/null
@@ -1,19 +0,0 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2013 Nils Schneider
-
-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$
-]]--
-
-module("luci.controller.admin.autoupdater", package.seeall)
-
-function index()
- entry({"admin", "autoupdater"}, cbi("admin/autoupdater"), _("Automatic updates"), 80)
-end
diff --git a/package/gluon-luci-mesh-vpn-fastd/files/usr/lib/lua/luci/view/gluon/cbi/mesh-vpn-fastd-mode.htm b/package/gluon-luci-mesh-vpn-fastd/files/usr/lib/lua/luci/view/gluon/cbi/mesh-vpn-fastd-mode.htm
deleted file mode 100644
index 0899fa1d..00000000
--- a/package/gluon-luci-mesh-vpn-fastd/files/usr/lib/lua/luci/view/gluon/cbi/mesh-vpn-fastd-mode.htm
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
- />
-
-
-
-
- <%= translate(
- 'In security mode, the mesh VPN uses an encrypted tunnel to connect to the VPN servers. ' ..
- 'The encryption ensures that it is impossible for your internet access provider to see what ' ..
- 'data is exchanged over your node.'
- ) %>
-
-
-
-
-
-
-
- />
-
-
-
-
- <%= translate(
- 'In performance mode, no encryption is used. This usually allows for higher throughput, but the data exchanged over your node is not ' ..
- 'protected against eavesdropping.'
- ) %>
-
-
-
-
diff --git a/package/gluon-luci-mesh-vpn-fastd/luasrc/usr/lib/lua/luci/controller/admin/mesh_vpn_fastd.lua b/package/gluon-luci-mesh-vpn-fastd/luasrc/usr/lib/lua/luci/controller/admin/mesh_vpn_fastd.lua
deleted file mode 100644
index 8141c44a..00000000
--- a/package/gluon-luci-mesh-vpn-fastd/luasrc/usr/lib/lua/luci/controller/admin/mesh_vpn_fastd.lua
+++ /dev/null
@@ -1,5 +0,0 @@
-module("luci.controller.admin.mesh_vpn_fastd", package.seeall)
-
-function index()
- entry({"admin", "mesh_vpn_fastd"}, cbi("admin/mesh_vpn_fastd"), _("Mesh VPN"), 20)
-end
diff --git a/package/gluon-luci-mesh-vpn-fastd/luasrc/usr/lib/lua/luci/model/cbi/admin/mesh_vpn_fastd.lua b/package/gluon-luci-mesh-vpn-fastd/luasrc/usr/lib/lua/luci/model/cbi/admin/mesh_vpn_fastd.lua
deleted file mode 100644
index 7dc5267c..00000000
--- a/package/gluon-luci-mesh-vpn-fastd/luasrc/usr/lib/lua/luci/model/cbi/admin/mesh_vpn_fastd.lua
+++ /dev/null
@@ -1,40 +0,0 @@
-local uci = require("simple-uci").cursor()
-local util = luci.util
-
-local f = SimpleForm('mesh_vpn', translate('Mesh VPN'))
-
-local s = f:section(SimpleSection)
-
-local o = s:option(Value, 'mode')
-o.template = "gluon/cbi/mesh-vpn-fastd-mode"
-
-local methods = uci:get('fastd', 'mesh_vpn', 'method')
-if util.contains(methods, 'null') then
- o.default = 'performance'
-else
- o.default = 'security'
-end
-
-function f.handle(self, state, data)
- if state == FORM_VALID then
- local site = require 'gluon.site_config'
-
- local methods = {}
- if data.mode == 'performance' then
- table.insert(methods, 'null')
- end
-
- for _, method in ipairs(site.fastd_mesh_vpn.methods) do
- if method ~= 'null' then
- table.insert(methods, method)
- end
- end
-
- uci:set('fastd', 'mesh_vpn', 'method', methods)
-
- uci:save('fastd')
- uci:commit('fastd')
- end
-end
-
-return f
diff --git a/package/gluon-luci-node-role/luasrc/usr/lib/lua/luci/controller/admin/noderole.lua b/package/gluon-luci-node-role/luasrc/usr/lib/lua/luci/controller/admin/noderole.lua
deleted file mode 100644
index cfca1275..00000000
--- a/package/gluon-luci-node-role/luasrc/usr/lib/lua/luci/controller/admin/noderole.lua
+++ /dev/null
@@ -1,5 +0,0 @@
-module("luci.controller.admin.noderole", package.seeall)
-
-function index()
- entry({"admin", "noderole"}, cbi("admin/noderole"), "Node role", 20)
-end
diff --git a/package/gluon-luci-node-role/luasrc/usr/lib/lua/luci/model/cbi/admin/noderole.lua b/package/gluon-luci-node-role/luasrc/usr/lib/lua/luci/model/cbi/admin/noderole.lua
deleted file mode 100644
index ea8202a4..00000000
--- a/package/gluon-luci-node-role/luasrc/usr/lib/lua/luci/model/cbi/admin/noderole.lua
+++ /dev/null
@@ -1,33 +0,0 @@
-local f, s, o
-local site = require 'gluon.site_config'
-local i18n = require "luci.i18n"
-local uci = require("simple-uci").cursor()
-local config = 'gluon-node-info'
-
--- where to read the configuration from
-local role = uci:get(config, uci:get_first(config, "system"), "role")
-
-f = SimpleForm("role", i18n.translate("Node role"))
-
-s = f:section(SimpleSection, nil, i18n.translate(
- "If this node has a special role within the freifunk network you can specify this role here. "
- .. "Please find out about the available roles and their impact first. "
- .. "Only change the role if you know what you are doing."))
-
-o = s:option(ListValue, "role", i18n.translate("Role"))
-o.default = role
-o.rmempty = false
-for _, role in ipairs(site.roles.list) do
- o:value(role, i18n.translate('gluon-luci-node-role:role:' .. role))
-end
-
-function f.handle(self, state, data)
- if state == FORM_VALID then
- uci:set(config, uci:get_first(config, "system"), "role", data.role)
-
- uci:save(config)
- uci:commit(config)
- end
-end
-
-return f
diff --git a/package/gluon-luci-portconfig/luasrc/usr/lib/lua/luci/controller/admin/portconfig.lua b/package/gluon-luci-portconfig/luasrc/usr/lib/lua/luci/controller/admin/portconfig.lua
deleted file mode 100644
index 037b56c8..00000000
--- a/package/gluon-luci-portconfig/luasrc/usr/lib/lua/luci/controller/admin/portconfig.lua
+++ /dev/null
@@ -1,19 +0,0 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2013 Nils Schneider
-
-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$
-]]--
-
-module("luci.controller.admin.portconfig", package.seeall)
-
-function index()
- entry({"admin", "portconfig"}, cbi("admin/portconfig"), _("Network"), 20)
-end
diff --git a/package/gluon-luci-portconfig/luasrc/usr/lib/lua/luci/model/cbi/admin/portconfig.lua b/package/gluon-luci-portconfig/luasrc/usr/lib/lua/luci/model/cbi/admin/portconfig.lua
deleted file mode 100644
index 13d87b51..00000000
--- a/package/gluon-luci-portconfig/luasrc/usr/lib/lua/luci/model/cbi/admin/portconfig.lua
+++ /dev/null
@@ -1,167 +0,0 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2014 Nils Schneider
-
-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$
-]]--
-
-local uci = require("simple-uci").cursor()
-local sysconfig = require 'gluon.sysconfig'
-local util = require 'gluon.util'
-
-local wan = uci:get_all("network", "wan")
-local wan6 = uci:get_all("network", "wan6")
-local dns = uci:get_first("gluon-wan-dnsmasq", "static")
-
-local f = SimpleForm("portconfig", translate("WAN connection"))
-
-local s
-local o
-
-s = f:section(SimpleSection, nil, nil)
-
-o = s:option(ListValue, "ipv4", translate("IPv4"))
-o:value("dhcp", translate("Automatic (DHCP)"))
-o:value("static", translate("Static"))
-o:value("none", translate("Disabled"))
-o.default = wan.proto
-
-o = s:option(Value, "ipv4_addr", translate("IP address"))
-o:depends("ipv4", "static")
-o.value = wan.ipaddr
-o.datatype = "ip4addr"
-o.rmempty = false
-
-o = s:option(Value, "ipv4_netmask", translate("Netmask"))
-o:depends("ipv4", "static")
-o.value = wan.netmask or "255.255.255.0"
-o.datatype = "ip4addr"
-o.rmempty = false
-
-o = s:option(Value, "ipv4_gateway", translate("Gateway"))
-o:depends("ipv4", "static")
-o.value = wan.gateway
-o.datatype = "ip4addr"
-o.rmempty = false
-
-
-s = f:section(SimpleSection, nil, nil)
-
-o = s:option(ListValue, "ipv6", translate("IPv6"))
-o:value("dhcpv6", translate("Automatic (RA/DHCPv6)"))
-o:value("static", translate("Static"))
-o:value("none", translate("Disabled"))
-o.default = wan6.proto
-
-o = s:option(Value, "ipv6_addr", translate("IP address"))
-o:depends("ipv6", "static")
-o.value = wan6.ip6addr
-o.datatype = "ip6addr"
-o.rmempty = false
-
-o = s:option(Value, "ipv6_gateway", translate("Gateway"))
-o:depends("ipv6", "static")
-o.value = wan6.ip6gw
-o.datatype = "ip6addr"
-o.rmempty = false
-
-
-if dns then
- s = f:section(SimpleSection, nil, nil)
-
- o = s:option(DynamicList, "dns", translate("Static DNS servers"))
- o:write(nil, uci:get("gluon-wan-dnsmasq", dns, "server"))
- o.datatype = "ipaddr"
-end
-
-s = f:section(SimpleSection, nil, nil)
-
-o = s:option(Flag, "mesh_wan", translate("Enable meshing on the WAN interface"))
-o.default = uci:get_bool("network", "mesh_wan", "auto") and o.enabled or o.disabled
-o.rmempty = false
-
-if sysconfig.lan_ifname then
- o = s:option(Flag, "mesh_lan", translate("Enable meshing on the LAN interface"))
- o.default = uci:get_bool("network", "mesh_lan", "auto") and o.enabled or o.disabled
- o.rmempty = false
-end
-
-if uci:get('system', 'gpio_switch_poe_passthrough') then
- s = f:section(SimpleSection, nil, nil)
- o = s:option(Flag, "poe_passthrough", translate("Enable PoE passthrough"))
- o.default = uci:get_bool("system", "gpio_switch_poe_passthrough", "value") and o.enabled or o.disabled
- o.rmempty = false
-end
-
-function f.handle(self, state, data)
- if state == FORM_VALID then
- uci:set("network", "wan", "proto", data.ipv4)
- if data.ipv4 == "static" then
- uci:set("network", "wan", "ipaddr", data.ipv4_addr:trim())
- uci:set("network", "wan", "netmask", data.ipv4_netmask:trim())
- uci:set("network", "wan", "gateway", data.ipv4_gateway:trim())
- else
- uci:delete("network", "wan", "ipaddr")
- uci:delete("network", "wan", "netmask")
- uci:delete("network", "wan", "gateway")
- end
-
- uci:set("network", "wan6", "proto", data.ipv6)
- if data.ipv6 == "static" then
- uci:set("network", "wan6", "ip6addr", data.ipv6_addr:trim())
- uci:set("network", "wan6", "ip6gw", data.ipv6_gateway:trim())
- else
- uci:delete("network", "wan6", "ip6addr")
- uci:delete("network", "wan6", "ip6gw")
- end
-
- uci:set("network", "mesh_wan", "auto", data.mesh_wan)
-
- if sysconfig.lan_ifname then
- uci:set("network", "mesh_lan", "auto", data.mesh_lan)
-
- local interfaces = uci:get_list("network", "client", "ifname")
-
- for lanif in sysconfig.lan_ifname:gmatch('%S+') do
- if data.mesh_lan == '1' then
- util.remove_from_set(interfaces, lanif)
- else
- util.add_to_set(interfaces, lanif)
- end
- end
-
- uci:set_list("network", "client", "ifname", interfaces)
- end
-
- uci:save("network")
- uci:commit("network")
-
- if uci:get('system', 'gpio_switch_poe_passthrough') then
- uci:set('system', 'gpio_switch_poe_passthrough', 'value', data.poe_passthrough)
- uci:save('system')
- uci:commit('system')
- end
-
- if dns then
- if #data.dns > 0 then
- uci:set("gluon-wan-dnsmasq", dns, "server", data.dns)
- else
- uci:delete("gluon-wan-dnsmasq", dns, "server")
- end
-
- uci:save("gluon-wan-dnsmasq")
- uci:commit("gluon-wan-dnsmasq")
- end
- end
-
- return true
-end
-
-return f
diff --git a/package/gluon-luci-private-wifi/luasrc/usr/lib/lua/luci/controller/admin/privatewifi.lua b/package/gluon-luci-private-wifi/luasrc/usr/lib/lua/luci/controller/admin/privatewifi.lua
deleted file mode 100644
index e11ba58b..00000000
--- a/package/gluon-luci-private-wifi/luasrc/usr/lib/lua/luci/controller/admin/privatewifi.lua
+++ /dev/null
@@ -1,5 +0,0 @@
-module("luci.controller.admin.privatewifi", package.seeall)
-
-function index()
- entry({"admin", "privatewifi"}, cbi("admin/privatewifi"), _("Private WLAN"), 10)
-end
diff --git a/package/gluon-luci-private-wifi/luasrc/usr/lib/lua/luci/model/cbi/admin/privatewifi.lua b/package/gluon-luci-private-wifi/luasrc/usr/lib/lua/luci/model/cbi/admin/privatewifi.lua
deleted file mode 100644
index 08e987a5..00000000
--- a/package/gluon-luci-private-wifi/luasrc/usr/lib/lua/luci/model/cbi/admin/privatewifi.lua
+++ /dev/null
@@ -1,67 +0,0 @@
-local uci = require("simple-uci").cursor()
-local util = require 'gluon.util'
-
-local f, s, o, ssid
-
--- where to read the configuration from
-local primary_iface = 'wan_radio0'
-local ssid = uci:get('wireless', primary_iface, "ssid")
-
-f = SimpleForm("wifi", translate("Private WLAN"))
-
-s = f:section(SimpleSection, nil, translate(
- 'Your node can additionally extend your private network by bridging the WAN interface '
- .. 'with a separate WLAN. This feature is completely independent of the mesh functionality. '
- .. 'Please note that the private WLAN and meshing on the WAN interface should not be enabled '
- .. 'at the same time.'
-))
-
-o = s:option(Flag, "enabled", translate("Enabled"))
-o.default = (ssid and not uci:get_bool('wireless', primary_iface, "disabled")) and o.enabled or o.disabled
-o.rmempty = false
-
-o = s:option(Value, "ssid", translate("Name (SSID)"))
-o:depends("enabled", '1')
-o.datatype = "maxlength(32)"
-o.default = ssid
-
-o = s:option(Value, "key", translate("Key"), translate("8-63 characters"))
-o:depends("enabled", '1')
-o.datatype = "wpakey"
-o.default = uci:get('wireless', primary_iface, "key")
-
-function f.handle(self, state, data)
- if state == FORM_VALID then
- util.iterate_radios(
- function(radio, index)
- local name = "wan_" .. radio
-
- if data.enabled == '1' then
- local macaddr = util.get_wlan_mac(radio, index, 4)
-
- -- set up WAN wifi-iface
- uci:section('wireless', "wifi-iface", name,
- {
- device = radio,
- network = "wan",
- mode = 'ap',
- encryption = 'psk2',
- ssid = data.ssid,
- key = data.key,
- macaddr = macaddr,
- disabled = false,
- }
- )
- else
- -- disable WAN wifi-iface
- uci:set('wireless', name, "disabled", true)
- end
- end
- )
-
- uci:save('wireless')
- uci:commit('wireless')
- end
-end
-
-return f
diff --git a/package/gluon-luci-theme/files/etc/uci-defaults/luci-theme-gluon b/package/gluon-luci-theme/files/etc/uci-defaults/luci-theme-gluon
deleted file mode 100755
index 795bd186..00000000
--- a/package/gluon-luci-theme/files/etc/uci-defaults/luci-theme-gluon
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-uci batch <<-EOF
- set luci.themes.Gluon=/luci-static/gluon
- commit luci
-EOF
-
diff --git a/package/gluon-luci-theme/files/usr/lib/lua/luci/view/themes/gluon/footer.htm b/package/gluon-luci-theme/files/usr/lib/lua/luci/view/themes/gluon/footer.htm
deleted file mode 100644
index 6b709030..00000000
--- a/package/gluon-luci-theme/files/usr/lib/lua/luci/view/themes/gluon/footer.htm
+++ /dev/null
@@ -1,19 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth
-Copyright 2008 Jo-Philipp Wich
-
-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$
-
--%>
-
-
-
-