Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 0x4A6F-master
  • 0x4A6F-rpi4
  • autinerd/experimental-openwrt-24.10
  • experimental
  • feature/addMikrotikwAP
  • master
  • nrb/airmax-test
  • nrb/ar9344-reset-sequence
  • nrb/ex400-remove-wps
  • nrb/gluon-master-cpe510
  • nrb/test-radv-filter
  • nrbffs/fastd-remove-delay
  • nrbffs/netgear-ex6120
  • v2018.2.2-ffs
  • v2018.2.3-ffs
  • v2019.1-ffs
  • v2019.1.1-ffs
  • v2019.1.2-ffs
  • v2020.1-ffs
  • v2020.1.1-ffs
  • v2020.1.3-ffs
  • v2020.2-ffs
  • v2020.2.1-ffs
  • v2020.2.2-ffs
  • v2020.2.3-ffs
  • v2021.1-ffs
  • v2021.1.1-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • v2022.1.3-ffs
  • v2022.1.4-ffs
  • v2023.1-ffs
  • v2023.2-ffs
  • v2023.2.2-ffs
  • v2023.2.3-ffs
  • v2023.2.4-ffs
  • v2023.2.5-ffs
  • experimental-2022-09-24
  • experimental-2022-09-24-base
  • experimental-2023-03-11
  • experimental-2023-03-11-base
  • experimental-2023-03-12
  • experimental-2023-03-12-base
  • experimental-2023-03-16
  • experimental-2023-03-16-base
  • experimental-2023-03-20
  • experimental-2023-03-20-base
  • experimental-2023-03-23
  • experimental-2023-03-23-base
  • experimental-2023-03-25
  • experimental-2023-03-25-base
  • experimental-2023-03-26
  • experimental-2023-03-26-base
  • experimental-2023-03-30
  • experimental-2023-03-30-base
  • experimental-2023-03-31
  • experimental-2023-03-31-base
  • experimental-2023-04-01
  • experimental-2023-04-01-base
  • experimental-2023-04-08
  • experimental-2023-04-08-base
  • experimental-2023-04-10
  • experimental-2023-04-10-base
  • experimental-2023-04-13
  • experimental-2023-04-13-base
  • experimental-2023-04-15
  • experimental-2023-04-15-base
  • experimental-2023-04-16
  • experimental-2023-04-16-base
  • experimental-2023-04-18
  • experimental-2023-04-18-base
  • experimental-2023-04-20
  • experimental-2023-04-20-base
  • experimental-2023-04-26
  • experimental-2023-04-26-base
  • experimental-2023-04-28
  • experimental-2023-04-28-base
  • experimental-2023-04-30
  • experimental-2023-04-30-base
  • experimental-2023-05-02
  • experimental-2023-05-02-base
  • experimental-2023-05-03
  • experimental-2023-05-03-base
  • experimental-2023-05-12
  • experimental-2023-05-12-base
  • experimental-2023-05-21
  • experimental-2023-05-21-base
  • experimental-2023-05-25
  • experimental-2023-05-25-base
  • experimental-2023-07-02
  • experimental-2023-07-02-base
  • experimental-2023-07-04
  • experimental-2023-07-04-base
  • experimental-2023-07-12
  • experimental-2023-07-12-base
  • experimental-2023-07-16
  • experimental-2023-07-16-base
  • experimental-2023-08-04
  • experimental-2023-08-04-base
  • experimental-2023-08-10
  • experimental-2023-08-10-base
  • experimental-2023-09-08
  • experimental-2023-09-08-base
  • experimental-2023-09-09
  • experimental-2023-09-09-base
  • experimental-2023-09-10
  • experimental-2023-09-10-base
  • experimental-2023-09-11
  • experimental-2023-09-11-base
  • experimental-2023-09-12
  • experimental-2023-09-12-base
  • experimental-2023-09-13
  • experimental-2023-09-13-base
  • experimental-2023-09-15
  • experimental-2023-09-15-base
  • experimental-2023-09-16
  • experimental-2023-09-16-base
  • experimental-2023-09-18
  • experimental-2023-09-18-base
  • experimental-2023-09-20
  • experimental-2023-09-20-base
  • experimental-2023-09-27
  • experimental-2023-09-27-base
  • experimental-2023-09-28
  • experimental-2023-09-28-base
  • experimental-2023-09-29
  • experimental-2023-09-29-base
  • experimental-2023-10-02
  • experimental-2023-10-02-base
  • experimental-2023-10-13
  • experimental-2023-10-13-base
  • experimental-2023-10-14
  • experimental-2023-10-14-base
  • experimental-2023-10-16
  • experimental-2023-10-16-base
  • experimental-2023-10-23
  • experimental-2023-10-23-base
137 results

Target

Select target project
  • firmware/gluon
  • 0x4A6F/gluon
  • patrick/gluon
3 results
Select Git revision
  • 0x4A6F-master
  • 0x4A6F-rpi4
  • 2014.3.x
  • 2014.4.x
  • babel
  • hoodselector
  • master
  • radv-filterd
  • v2015.1.x
  • v2016.1.x
  • v2016.2.4-batmanbug
  • v2016.2.x
  • v2018.2.2-ffs
  • v2018.2.x
  • v2014.1
  • v2014.2
  • v2014.3
  • v2014.3.1
  • v2014.4
  • v2015.1
  • v2015.1.1
  • v2015.1.2
  • v2016.1
  • v2016.1.1
  • v2016.1.2
  • v2016.1.3
  • v2016.1.4
  • v2016.1.5
  • v2016.1.6
  • v2016.2
  • v2016.2.1
  • v2016.2.2
  • v2016.2.3
  • v2016.2.4
  • v2016.2.5
  • v2016.2.6
  • v2016.2.7
  • v2017.1
  • v2017.1.1
  • v2017.1.2
  • v2017.1.3
  • v2017.1.4
  • v2017.1.5
  • v2017.1.6
  • v2017.1.7
  • v2017.1.8
  • v2018.1
  • v2018.1.1
  • v2018.1.2
  • v2018.1.3
  • v2018.1.4
  • v2018.2
  • v2018.2-ffs0.1
  • v2018.2.1
  • v2018.2.1-ffs0.1
  • v2018.2.2-ffs0.1
56 results
Show changes
Showing
with 197 additions and 185 deletions
#!/usr/bin/lua
local sysconfig = require 'gluon.sysconfig'
local sysctl = require 'gluon.sysctl'
local util = require 'gluon.util'
local uci = require('simple-uci').cursor()
local interfaces = uci:get('network', 'client', 'ifname') or {}
if type(interfaces) == 'string' then
local ifname = interfaces
interfaces = {}
for iface in ifname:gmatch('%S+') do
util.add_to_set(interfaces, iface)
end
end
if sysconfig.lan_ifname and uci:get_bool('network', 'mesh_lan', 'disabled') then
for lanif in sysconfig.lan_ifname:gmatch('%S+') do
util.add_to_set(interfaces, lanif)
end
end
local interfaces = util.get_role_interfaces(uci, 'client', true)
util.add_to_set(interfaces, 'local-port')
uci:delete('network', 'client')
uci:section('network', 'interface', 'client', {
type = 'bridge',
ifname = interfaces,
......@@ -36,13 +18,11 @@ uci:section('network', 'interface', 'client', {
macaddr = sysconfig.primary_mac,
igmp_snooping = true,
multicast_querier = true,
ra_holdoff = 30,
})
uci:save('network')
-- TODO: remove this line and the next in 2019. Firewall zones have been renamed in 2017.
uci:delete('firewall', 'client')
uci:section('firewall', 'zone', 'drop', {
name = 'drop',
network = {'client'},
......@@ -51,9 +31,9 @@ uci:section('firewall', 'zone', 'drop', {
forward = 'DROP',
})
local networks = uci:get_list('firewall', 'local_client', 'network')
local networks = uci:get_list('firewall', 'loc_client', 'network')
util.add_to_set(networks, 'local_node')
uci:set_list('firewall', 'local_client', 'network', networks)
uci:set_list('firewall', 'loc_client', 'network', networks)
local dnsmasq = uci:get_first('dhcp', 'dnsmasq')
......@@ -61,10 +41,6 @@ uci:set('dhcp', dnsmasq, 'boguspriv', false)
uci:set('dhcp', dnsmasq, 'localise_queries', false)
uci:set('dhcp', dnsmasq, 'rebind_protection', false)
-- TODO: remove this line and the next two in 2019 the zones were removed in 2017
uci:delete('dhcp', 'client')
uci:delete('firewall', 'local_node')
uci:section('dhcp', 'dhcp', 'local_client', {
interface = 'client',
ignore = true,
......@@ -72,6 +48,3 @@ uci:section('dhcp', 'dhcp', 'local_client', {
uci:save('dhcp')
uci:save('firewall')
sysctl.set('net.ipv6.conf.br-client.forwarding', 0)
......@@ -10,7 +10,6 @@ local uci = require('simple-uci').cursor()
local next_node = site.next_node({})
uci:delete('network', 'local_node_dev')
uci:section('network', 'device', 'local_node_dev', {
type = 'veth',
name = 'local-node',
......@@ -31,7 +30,6 @@ if next_node.ip6 then
ip6 = next_node.ip6 .. '/128'
end
uci:delete('network', 'local_node')
uci:section('network', 'interface', 'local_node', {
ifname = 'local-node',
proto = 'static',
......
#!/usr/bin/lua
local util = require 'gluon.util'
local wireless = require 'gluon.wireless'
local uci = require('simple-uci').cursor()
......@@ -13,9 +13,7 @@ local function is_disabled(config, name)
return config.disabled(false)
end
util.foreach_radio(uci, function(radio, index, config)
local radio_name = radio['.name']
local function configure_ap(radio, index, config, radio_name)
local name = 'client_' .. radio_name
local suffix = radio_name:match('^radio(%d+)$')
......@@ -24,12 +22,9 @@ util.foreach_radio(uci, function(radio, index, config)
uci:delete('wireless', name)
if not ap() then
return
end
local macaddr = wireless.get_wlan_mac('client', index, radio)
local macaddr = util.get_wlan_mac(uci, radio, index, 1)
if not macaddr then
if not ap.ssid() or not macaddr then
return
end
......@@ -42,6 +37,79 @@ util.foreach_radio(uci, function(radio, index, config)
ifname = suffix and 'client' .. suffix,
disabled = disabled or false,
})
end
local function configure_owe(radio, index, config, radio_name)
local name = 'owe_' .. radio_name
local suffix = radio_name:match('^radio(%d+)$')
local ap = config.ap
local disabled = is_disabled(ap, 'client_' .. radio_name)
uci:delete('wireless', name)
-- Don't configure OWE in case our device
-- can't do MFP, as it's mandatory for OWE.
if not wireless.device_supports_mfp(uci) then
return
end
local macaddr = wireless.get_wlan_mac('mesh', index, radio)
if not ap.owe_ssid() or not macaddr then
return
end
uci:section('wireless', 'wifi-iface', name, {
device = radio_name,
network = 'client',
mode = 'ap',
ssid = ap.owe_ssid(),
macaddr = macaddr,
ifname = suffix and 'owe' .. suffix,
disabled = disabled or false,
encryption = 'owe',
ieee80211w = 2,
})
end
local function configure_owe_transition_mode(config, radio_name)
local ap = config.ap
-- Don't configure OWE in case our device
-- can't do MFP, as it's mandatory for OWE.
if not wireless.device_supports_mfp(uci) then
return
end
if not ap.owe_transition_mode(false) then
return
end
local name_client = 'client_' .. radio_name
local name_owe = 'owe_' .. radio_name
local ifname_client = uci:get('wireless', name_client, 'ifname')
local ifname_owe = uci:get('wireless', name_owe, 'ifname')
if not (ifname_client and ifname_owe) then
return
end
uci:set('wireless', name_client, 'owe_transition_ifname', ifname_owe)
uci:set('wireless', name_owe, 'owe_transition_ifname', ifname_client)
uci:set('wireless', name_owe, 'hidden', '1')
end
wireless.foreach_radio(uci, function(radio, index, config)
local radio_name = radio['.name']
configure_ap(radio, index, config, radio_name)
configure_owe(radio, index, config, radio_name)
configure_owe_transition_mode(config, radio_name)
end)
uci:save('wireless')
local site = require 'gluon.site'
module 'gluon.client_bridge'
local M = {}
function next_node_macaddr()
function M.next_node_macaddr()
return site.next_node.mac('16:41:95:40:f7:dc')
end
return M
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-autoupdater
PKG_VERSION:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include ../gluon.mk
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
define Package/gluon-config-mode-autoupdater
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Config Mode: Let the user know whether the autoupdater is enabled or not
DEPENDS:=+gluon-config-mode-core +gluon-autoupdater
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
$(call GluonBuildI18N,gluon-config-mode-autoupdater,i18n)
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
endef
define Package/gluon-config-mode-autoupdater/install
$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
$(call GluonInstallI18N,gluon-config-mode-autoupdater,$(1))
endef
$(eval $(call BuildPackage,gluon-config-mode-autoupdater))
$(eval $(call BuildPackageGluon,gluon-config-mode-autoupdater))
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-03-18 16:03+0100\n"
"Last-Translator: Matthias Schiffer <mschiffer@universe-factory.net>\n"
"Language-Team: German\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid ""
"This node will automatically update its firmware when a new version is "
"available."
msgstr ""
"Dieser Knoten aktualisiert seine Firmware automatisch, sobald "
"eine neue Version vorliegt."
msgid ""
"Automatic updates are disabled. They can be enabled in <em>Advanced "
"settings</em>."
msgstr ""
"Automatische Updates sind deaktiviert. Sie können in den <em>Erweiterten "
"Einstellungen</em> aktiviert werden."
msgid ""
"This node will automatically update its firmware when a new version is "
"available."
msgstr ""
"Dieser Knoten aktualisiert seine Firmware automatisch, sobald eine neue "
"Version vorliegt."
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-08-04 20:20+0100\n"
"Last-Translator: Bernot Tobias <tqbs@airmail.cc>\n"
"Language-Team: French\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid ""
"This node will automatically update its firmware when a new version is "
"available."
msgstr "Ce nœud s'actualisera automatiquement quand une nouvelle "
"version sera disponible."
msgid ""
"Automatic updates are disabled. They can be enabled in <em>Advanced "
"settings</em>."
msgstr ""
"Mises à jour automatiques sont désactivées. Ils peuvent être activés dans "
"<em>Paramètres avancés</em>."
msgid ""
"This node will automatically update its firmware when a new version is "
"available."
msgstr ""
"Ce nœud s'actualisera automatiquement quand une nouvelle version sera "
"disponible."
......@@ -2,11 +2,11 @@ msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid ""
"This node will automatically update its firmware when a new version is "
"available."
"Automatic updates are disabled. They can be enabled in <em>Advanced "
"settings</em>."
msgstr ""
msgid ""
"Automatic updates are disabled. They can be enabled in <em>Advanced "
"settings</em>."
"This node will automatically update its firmware when a new version is "
"available."
msgstr ""
return function(form, uci)
local pkg_i18n = i18n 'gluon-config-mode-autoupdater'
local enabled = uci:get_bool("autoupdater", "settings", "enabled")
if enabled then
form:section(
Section, nil,
translate('This node will automatically update its firmware when a new version is available.')
pkg_i18n.translate('This node will automatically update its firmware when a new version is available.')
)
else
form:section(
Section, nil,
translate('Automatic updates are disabled. They can be enabled in <em>Advanced settings</em>.')
pkg_i18n.translate('Automatic updates are disabled. They can be enabled in <em>Advanced settings</em>.')
)
end
end
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-contact-info
PKG_VERSION:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include ../gluon.mk
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
define Package/gluon-config-mode-contact-info
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Allows the user to provide contact information to be distributed in the mesh
DEPENDS:=+gluon-config-mode-core +gluon-node-info
endef
define Package/gluon-config-mode-contact-info/description
Allows the user to provide contact information to be distributed in the mesh.
Can be made obligatory in site.conf
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
$(call GluonBuildI18N,gluon-config-mode-contact-info,i18n)
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
endef
define Package/gluon-config-mode-contact-info/install
$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
$(call GluonInstallI18N,gluon-config-mode-contact-info,$(1))
endef
define Package/gluon-config-mode-contact-info/postinst
#!/bin/sh
$(call GluonCheckSite,check_site.lua)
endef
$(eval $(call BuildPackage,gluon-config-mode-contact-info))
$(eval $(call BuildPackageGluon,gluon-config-mode-contact-info))
need_boolean(in_site({'config_mode', 'owner', 'obligatory'}), false)
......@@ -14,14 +14,20 @@ msgid "Contact info"
msgstr "Kontakt"
msgid ""
"Please provide your contact information here to allow others to contact "
"you. Note that this information will be visible <em>publicly</em> on "
"the internet together with your node's coordinates."
"Please provide your contact information here to allow others to contact you. "
"Note that this information will be visible <em>publicly</em> on the internet "
"together with your node's coordinates. This means it can be downloaded and "
"processed by anyone. This information is not required to operate a node. If "
"you chose to enter data, it will be stored on this node and can be deleted "
"by yourself at any time."
msgstr ""
"Bitte hinterlege hier einen Hinweis, um anderen zu ermöglichen, "
"Kontakt mit dir aufzunehmen. Beachte, dass dieser Hinweis auch "
"<em>öffentlich</em> im Internet, zusammen mit den Koordinaten "
"deines Knotens, einsehbar sein wird."
"Bitte hinterlege hier einen Hinweis, um anderen zu ermöglichen, Kontakt mit "
"dir aufzunehmen. Beachte, dass dieser Hinweis auch <em>öffentlich</em> im "
"Internet, zusammen mit den Koordinaten deines Knotens, einsehbar sein wird. "
"Das bedeutet, dass diese Informationen von jedem heruntergeladen und "
"verarbeitet werden können. Für den Betrieb sind diese Informationen nicht "
"erforderlich. Eine Speicherung erfolgt auf diesem Knoten. Die Daten können "
"durch dich in diesem Menü eigenständig gelöscht werden."
msgid "e.g. E-mail or phone number"
msgstr "z.B. E-Mail oder Telefonnummer"
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-08-12 23:30+0100\n"
"Last-Translator:Tobias Bernot <tqbs@airmail.cc>\n"
"Language-Team: French\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
......@@ -14,13 +14,19 @@ msgid "Contact info"
msgstr "Informations de Contact"
msgid ""
"Please provide your contact information here to allow others to contact "
"you. Note that this information will be visible <em>publicly</em> on "
"the internet together with your node's coordinates."
"Please provide your contact information here to allow others to contact you. "
"Note that this information will be visible <em>publicly</em> on the internet "
"together with your node's coordinates. This means it can be downloaded and "
"processed by anyone. This information is not required to operate a node. If "
"you chose to enter data, it will be stored on this node and can be deleted "
"by yourself at any time."
msgstr ""
"S'il vous plaît entrez ici des informations <em>publiques</em> pour "
"permettre aux autres de vous contacter. "
"Ces informations seront affichées en ligne, avec les coordonnées du nœud."
"Entrez vos coordonnées ici si vous souhaitez permettre à d'autres personnes "
"de communiquer avec vous. Ces informations seront affichées <em>en ligne</"
"em> avec les coordonnées du nœud. Il peut être téléchargé et traité par "
"tous. Il n'est pas obligatoire de fournir ces informations pour pouvoir "
"opérer un nœud. Si vous avez choisi d'entrer des données, elles seront "
"stockées sur ce nœud et vous pourrez les effacer par vous-même à tout moment."
msgid "e.g. E-mail or phone number"
msgstr "Ex : E-mail ou numéro de téléphone"
......@@ -5,9 +5,12 @@ msgid "Contact info"
msgstr ""
msgid ""
"Please provide your contact information here to allow others to contact "
"you. Note that this information will be visible <em>publicly</em> on "
"the internet together with your node's coordinates."
"Please provide your contact information here to allow others to contact you. "
"Note that this information will be visible <em>publicly</em> on the internet "
"together with your node's coordinates. This means it can be downloaded and "
"processed by anyone. This information is not required to operate a node. If "
"you chose to enter data, it will be stored on this node and can be deleted "
"by yourself at any time."
msgstr ""
msgid "e.g. E-mail or phone number"
......
return function(form, uci)
local site = require 'gluon.site'
local pkg_i18n = i18n 'gluon-config-mode-contact-info'
local site_i18n = i18n 'gluon-site'
local owner = uci:get_first("gluon-node-info", "owner")
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 <em>publicly</em> '
.. 'on the internet together with your node\'s coordinates.'
))
local help = site_i18n._translate("gluon-config-mode:contact-help") or pkg_i18n.translate(
'Please provide your contact information here to allow others to contact '
.. 'you. Note that this information will be visible <em>publicly</em> on '
.. 'the internet together with your node\'s coordinates. This means it can '
.. 'be downloaded and processed by anyone. This information is '
.. 'not required to operate a node. If you chose to enter data, it will be '
.. 'stored on this node and can be deleted by yourself at any time.'
)
local s = form:section(Section, nil, help)
local o = s:option(Value, "contact", translate("Contact info"), translate("e.g. E-mail or phone number"))
local o = s:option(Value, "contact", pkg_i18n.translate("Contact info"),
site_i18n._translate("gluon-config-mode:contact-note") or pkg_i18n.translate("e.g. E-mail or phone number"))
o.default = uci:get("gluon-node-info", owner, "contact")
o.optional = not site.config_mode.owner.obligatory(false)
-- without a minimal length, an empty string will be accepted even with "optional = false"
o.datatype = "minlength(1)"
o.datatype = 'minlength(1)'
o.optional = true
function o:write(data)
uci:set("gluon-node-info", owner, "contact", data)
uci:save("gluon-node-info")
end
return {'gluon-node-info'}
end
......@@ -4,38 +4,21 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-core
PKG_VERSION:=2
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include ../gluon.mk
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
define Package/gluon-config-mode-core
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Configuration wizard for user friendly setup of new mesh nodes
DEPENDS:=+gluon-setup-mode +gluon-web-theme +gluon-lock-password +pretty-hostname
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
$(call GluonBuildI18N,gluon-config-mode-core,i18n)
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
DEPENDS:=+gluon-setup-mode +gluon-web-model +gluon-config-mode-theme +uhttpd
endef
define Package/gluon-config-mode-core/install
$(CP) ./files/* $(1)/
$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
$(call GluonInstallI18N,gluon-config-mode-core,$(1))
$(Gluon/Build/Install)
$(INSTALL_DIR) $(1)/lib/gluon/config-mode/view/ $(1)/lib/gluon/config-mode/www/static/
$(LN) /lib/gluon/web/i18n $(1)/lib/gluon/config-mode/
$(LN) /lib/gluon/web/view/{error,model} $(1)/lib/gluon/config-mode/view/
$(LN) /lib/gluon/web/www/static/gluon-web-model.js $(1)/lib/gluon/config-mode/www/static/
endef
$(eval $(call BuildPackage,gluon-config-mode-core))
$(eval $(call BuildPackageGluon,gluon-config-mode-core))
<h2><%:Your node's setup is now complete.%></h2>
<%
local util = require "gluon.util"
local parts = {}
for _, entry in ipairs(util.glob('/lib/gluon/config-mode/reboot/*')) do
local p = assert(loadfile(entry))
setfenv(p, getfenv())
table.insert(parts, p)
end
for _, p in ipairs(parts) do
p()
end
%>
<%-
local site_i18n = i18n 'gluon-site'
local sysconfig = require 'gluon.sysconfig'
local msg = _translate('gluon-config-mode:welcome')
local msg = site_i18n._translate('gluon-config-mode:welcome')
if not msg then return end
-%>
<p>
......
<!DOCTYPE html>
<html lang="">
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta http-equiv="refresh" content="0; URL=/cgi-bin/config">
</head>
<body>
</body>
</html>
......@@ -9,6 +9,6 @@ UHTTPD_BIN="/usr/sbin/uhttpd"
start_service() {
procd_open_instance
procd_set_param respawn
procd_set_param command "$UHTTPD_BIN" -f -h /lib/gluon/web/www -x /cgi-bin -A 1 -R -p 0.0.0.0:80
procd_set_param command "$UHTTPD_BIN" -f -h /lib/gluon/config-mode/www -x /cgi-bin -A 1 -R -p 0.0.0.0:80
procd_close_instance
}