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 263 additions and 275 deletions
/*
Copyright (c) 2016, Matthias Schiffer <mschiffer@universe-factory.net>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* SPDX-FileCopyrightText: 2016, Matthias Schiffer <mschiffer@universe-factory.net> */
/* SPDX-License-Identifier: BSD-2-Clause */
#include <respondd.h>
......@@ -36,6 +14,8 @@
static struct json_object * get_autoupdater(void) {
struct uci_context *ctx = uci_alloc_context();
if (!ctx)
return NULL;
ctx->flags &= ~UCI_FLAG_STRICT;
struct uci_package *p;
......
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-client-bridge
PKG_VERSION:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include ../gluon.mk
define Package/gluon-client-bridge
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Provides a bridge and a wireless interface for clients to connect to
DEPENDS:=+gluon-core +kmod-veth
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
endef
define Package/gluon-client-bridge/install
$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
endef
define Package/gluon-client-bridge/postinst
#!/bin/sh
$(call GluonCheckSite,check_site.lua)
endef
$(eval $(call BuildPackage,gluon-client-bridge))
$(eval $(call BuildPackageGluon,gluon-client-bridge))
need_string_match('next_node.mac', '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$')
need_string_match(in_domain({'next_node', 'mac'}), '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$', false)
if need_string_match('next_node.ip4', '^%d+.%d+.%d+.%d+$', false) then
need_string_match('prefix4', '^%d+.%d+.%d+.%d+/%d+$')
if need_string_match(in_domain({'next_node', 'ip4'}), '^%d+.%d+.%d+.%d+$', false) then
need_string_match(in_domain({'prefix4'}), '^%d+.%d+.%d+.%d+/%d+$')
end
need_string_match('next_node.ip6', '^[%x:]+$', false)
need_string_match(in_domain({'next_node', 'ip6'}), '^[%x:]+$', false)
for _, config in ipairs({'wifi24', 'wifi5'}) do
if need_table(config .. '.ap', nil, false) then
need_string(config .. '.ap.ssid')
need_boolean(config .. '.ap.disabled', false)
if need_table({config, 'ap'}, nil, false) then
need_boolean({config, 'ap', 'disabled'}, false)
if need_boolean({config, 'ap', 'owe_transition_mode'}, false) then
need_string_match(in_domain({config, 'ap', 'ssid'}), '^' .. ('.?'):rep(32) .. '$')
need_string_match(in_domain({config, 'ap', 'owe_ssid'}), '^' .. ('.?'):rep(32) .. '$')
else
need_string_match(in_domain({config, 'ap', 'ssid'}), '^' .. ('.?'):rep(32) .. '$', false)
need_string_match(in_domain({config, 'ap', 'owe_ssid'}), '^' .. ('.?'):rep(32) .. '$', false)
end
end
end
#!/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 not ifname and not uci:get_bool('network', 'mesh_lan', 'auto') 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,21 +18,22 @@ uci:section('network', 'interface', 'client', {
macaddr = sysconfig.primary_mac,
igmp_snooping = true,
multicast_querier = true,
ra_holdoff = 30,
})
uci:save('network')
uci:delete('firewall', 'client')
uci:section('firewall', 'zone', 'client', {
name = 'client',
uci:section('firewall', 'zone', 'drop', {
name = 'drop',
network = {'client'},
input = 'DROP',
output = 'DROP',
forward = 'DROP',
})
uci:save('firewall')
local networks = uci:get_list('firewall', 'loc_client', 'network')
util.add_to_set(networks, 'local_node')
uci:set_list('firewall', 'loc_client', 'network', networks)
local dnsmasq = uci:get_first('dhcp', 'dnsmasq')
......@@ -58,13 +41,10 @@ uci:set('dhcp', dnsmasq, 'boguspriv', false)
uci:set('dhcp', dnsmasq, 'localise_queries', false)
uci:set('dhcp', dnsmasq, 'rebind_protection', false)
uci:delete('dhcp', 'client')
uci:section('dhcp', 'dhcp', 'client', {
uci:section('dhcp', 'dhcp', 'local_client', {
interface = 'client',
ignore = true,
})
uci:save('dhcp')
sysctl.set('net.ipv6.conf.br-client.forwarding', 0)
uci:save('firewall')
#!/usr/bin/lua
local site = require 'gluon.site_config'
local client_bridge = require 'gluon.client_bridge'
local site = require 'gluon.site'
local sysconfig = require 'gluon.sysconfig'
local uci = require('simple-uci').cursor()
uci:delete('network', 'local_node_dev')
local next_node = site.next_node({})
uci:section('network', 'device', 'local_node_dev', {
type = 'veth',
name = 'local-node',
macaddr = site.next_node.mac,
macaddr = client_bridge.next_node_macaddr(),
peer_name = 'local-port',
peer_macaddr = sysconfig.primary_mac,
})
......@@ -18,16 +21,15 @@ uci:section('network', 'device', 'local_node_dev', {
local ip4, ip6
if site.next_node.ip4 then
local plen = site.prefix4:match('/%d+$')
ip4 = site.next_node.ip4 .. plen
if next_node.ip4 then
local plen = site.prefix4():match('/%d+$')
ip4 = next_node.ip4 .. plen
end
if site.next_node.ip6 then
ip6 = site.next_node.ip6 .. '/128'
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 site = require 'gluon.site_config'
local util = require 'gluon.util'
local wireless = require 'gluon.wireless'
local uci = require('simple-uci').cursor()
local function is_disabled(config, name)
local disabled
if uci:get('wireless', name) then
disabled = uci:get_bool('wireless', name, 'disabled')
else
disabled = config and config.disabled
return uci:get_bool('wireless', name, 'disabled')
end
return disabled
return config.disabled(false)
end
local function configure_client(config, radio, index, suffix)
local name = 'client_' .. radio
local disabled = is_disabled(config, name)
local function configure_ap(radio, index, config, radio_name)
local name = 'client_' .. radio_name
local suffix = radio_name:match('^radio(%d+)$')
local ap = config.ap
local disabled = is_disabled(ap, name)
uci:delete('wireless', name)
if not config then
local macaddr = wireless.get_wlan_mac('client', index, radio)
if not ap.ssid() or not macaddr then
return
end
local macaddr = util.get_wlan_mac(uci, radio, index, 1)
if not macaddr then
uci:section('wireless', 'wifi-iface', name, {
device = radio_name,
network = 'client',
mode = 'ap',
ssid = ap.ssid(),
macaddr = macaddr,
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
uci:section('wireless', 'wifi-iface', name,
{
device = radio,
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 = config.ssid,
ssid = ap.owe_ssid(),
macaddr = macaddr,
ifname = suffix and 'client' .. suffix,
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
local function configure_radio(radio, index, config)
local suffix = radio:match('^radio(%d+)$')
uci:set('wireless', name_client, 'owe_transition_ifname', ifname_owe)
uci:set('wireless', name_owe, 'owe_transition_ifname', ifname_client)
configure_client(config.ap, radio, index, suffix)
uci:set('wireless', name_owe, 'hidden', '1')
end
util.iterate_radios(uci, configure_radio)
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'
local M = {}
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-virtual +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))
DEPENDS:=+gluon-config-mode-core +gluon-autoupdater
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 ""
"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."
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 ""
"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."
msgstr ""
"Ce nœud s'actualisera automatiquement quand une nouvelle version sera "
"disponible."
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid ""
"Automatic updates are disabled. They can be enabled in <em>Advanced "
"settings</em>."
msgstr ""
msgid ""
"This node will automatically update its firmware when a new version is "
"available."
......
return function(form, uci)
if uci:get_bool("autoupdater", "settings", "enabled") then
local s = form:section(
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,
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-virtual +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)
DEPENDS:=+gluon-config-mode-core +gluon-node-info
endef
$(eval $(call BuildPackage,gluon-config-mode-contact-info))
$(eval $(call BuildPackageGluon,gluon-config-mode-contact-info))
if need_table('config_mode', nil, false) and need_table('config_mode.owner', nil, false) then
need_boolean('config_mode.owner.obligatory', false)
end
......@@ -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_config'
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 or {}).owner or {}).obligatory
-- 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)
if data then
uci:set("gluon-node-info", owner, "contact", data)
else
uci:delete("gluon-node-info", owner, "contact")
uci:save("gluon-node-info")
end
end
return {'gluon-node-info'}
end
......@@ -4,39 +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-virtual +gluon-web-theme +gluon-lock-password +pretty-hostname
PROVIDES:=gluon-config-mode-core-virtual
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
%>