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
Loading items

Target

Select target project
  • firmware/gluon
  • 0x4A6F/gluon
  • patrick/gluon
3 results
Select Git revision
Loading items
Show changes
Showing
with 469 additions and 897 deletions
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-hostname
PKG_VERSION:=1
include ../gluon.mk
......
......@@ -30,7 +30,6 @@ return function(form, uci)
function o:write(data)
pretty_hostname.set(uci, data or default_hostname)
uci:save('system')
end
return {'system'}
end
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-mesh-vpn
PKG_VERSION:=2
include ../gluon.mk
......
local site_i18n = i18n 'gluon-site'
local uci = require("simple-uci").cursor()
local unistd = require 'posix.unistd'
local platform = require 'gluon.platform'
local site = require 'gluon.site'
local sysconfig = require 'gluon.sysconfig'
local util = require "gluon.util"
local vpn = require 'gluon.mesh-vpn'
local pretty_hostname = require 'pretty_hostname'
local has_fastd = unistd.access('/lib/gluon/mesh-vpn/fastd')
local has_tunneldigger = unistd.access('/lib/gluon/mesh-vpn/tunneldigger')
local hostname = pretty_hostname.get(uci)
local contact = uci:get_first("gluon-node-info", "owner", "contact")
......@@ -22,20 +16,19 @@ local pubkey
local msg
if has_tunneldigger then
local tunneldigger_enabled = uci:get_bool("tunneldigger", "mesh_vpn", "enabled")
if not tunneldigger_enabled then
msg = site_i18n._translate('gluon-config-mode:novpn')
if vpn.enabled() then
local _, active_vpn = vpn.get_active_provider()
if active_vpn ~= nil then
pubkey = active_vpn.public_key()
end
elseif has_fastd then
local fastd_enabled = uci:get_bool("fastd", "mesh_vpn", "enabled")
if fastd_enabled then
pubkey = util.trim(util.exec("/etc/init.d/fastd show_key mesh_vpn"))
if pubkey ~= nil then
msg = site_i18n._translate('gluon-config-mode:pubkey')
end
else
msg = site_i18n._translate('gluon-config-mode:novpn')
end
end
if not msg then return end
......
local unistd = require 'posix.unistd'
local has_fastd = unistd.access('/lib/gluon/mesh-vpn/fastd')
local has_tunneldigger = unistd.access('/lib/gluon/mesh-vpn/tunneldigger')
local vpn = require 'gluon.mesh-vpn'
local _, active_vpn = vpn.get_active_provider()
return function(form, uci)
if not (has_fastd or has_tunneldigger) then
if active_vpn == nil then
return
end
......@@ -58,11 +56,7 @@ return function(form, uci)
uci:set("gluon", "mesh_vpn", "limit_egress", data * 1000)
end
function s:handle()
Section.handle(s)
function s:write()
uci:save('gluon')
os.execute('exec /lib/gluon/mesh-vpn/update-config')
end
return {'gluon', 'fastd', 'tunneldigger', 'simple-tc'}
end
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-outdoor
PKG_VERSION:=1
include ../gluon.mk
......
......@@ -2,7 +2,7 @@ return function(form, uci)
local platform = require 'gluon.platform'
local wireless = require 'gluon.wireless'
if not (platform.is_outdoor_device() and platform.device_uses_11a(uci)) then
if not (platform.is_outdoor_device() and wireless.device_uses_11a(uci)) then
-- only visible on wizard for outdoor devices
return
end
......@@ -31,7 +31,7 @@ return function(form, uci)
if data == false then
local mesh_ifaces_5ghz = {}
uci:foreach('wireless', 'wifi-device', function(config)
if config.hwmode ~= '11a' and config.hwmode ~= '11na' then
if config.band ~= '5g' then
return
end
......@@ -44,10 +44,6 @@ return function(form, uci)
end
uci:save('wireless')
end
os.execute('/lib/gluon/upgrade/200-wireless')
end
end
return {'gluon', 'network', 'wireless'}
end
......@@ -4,7 +4,6 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-theme
PKG_VERSION:=1
include ../gluon.mk
......
<%#
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008-2010 Jo-Philipp Wich <xm@subsignal.org>
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
SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2008 Steven Barth <steven@midlink.org>
SPDX-FileCopyrightText: 2008-2010 Jo-Philipp Wich <xm@subsignal.org>
-%>
<%
local pretty_hostname = require "pretty_hostname"
......@@ -82,7 +77,7 @@ You may obtain a copy of the License at
end
%>
</ul>
<br style="clear:both" />
<br style="clear:both">
<%
subtree(append(prefix, name), node.nodes[name], ...)
%>
......@@ -94,13 +89,13 @@ You may obtain a copy of the License at
subtree({path}, root.nodes[category], ...)
end
http:prepare_content("application/xhtml+xml")
http:prepare_content("text/html")
-%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<html lang="">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" media="screen" href="/static/gluon.css" />
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" media="screen" href="/static/gluon.css">
<title><%| hostname .. ((rnode and rnode.title) and ' - ' .. title(rnode) or '') %></title>
</head>
<body>
......@@ -134,7 +129,7 @@ You may obtain a copy of the License at
<div id="maincontent">
<noscript>
<div class="errorbox">
<strong><%:JavaScript required!%></strong><br />
<strong><%:JavaScript required!%></strong><br>
<%:You must enable JavaScript in your browser or the web interface will not work properly.%>
</div>
</noscript>
......
.lang_he{direction:RTL;unicode-bidi:embed}.hidden{display:none}html{min-height:100%;height:auto;position:relative}body,input,select,option{font-family:'Open Sans', Arial, sans-serif;font-size:12pt}body{color:#4d4e53;line-height:1.5em;margin:0;display:flex;flex-direction:column;min-height:100vh;background-color:#f3f3f3}a img{border:none;text-decoration:none}.tabmenu1{text-align:center}ul.tabmenu{list-style:none;padding:0;margin:2em 0;display:inline-flex}ul.tabmenu li{white-space:nowrap;margin:0 0.5em;padding:0;text-align:center}ul.tabmenu li a{display:block;text-decoration:none;padding:1em;margin:0;color:#333;border-radius:2em}ul.tabmenu li a:hover{background:#ffe9b3}ul.tabmenu li.active a{font-weight:bold;background:white;color:#333}abbr,acronym{font-style:normal;font-variant:normal}abbr[title],acronym[title]{border-bottom:1px dotted;cursor:help}a:link abbr[title],a:visited abbr[title],a:link acronym[title],a:visited acronym[title]{cursor:pointer}code{font-family:monospace;white-space:pre}#maincontent ul{margin-left:2em}.clear{clear:both}.error{color:#ff0000;background-color:white}#menubar{display:flex;background:#dc0067;color:#ffffff}#menubar a:link.topcat,#menubar a:visited.topcat{position:relative;display:block;padding:0.5em;text-decoration:none;font-size:80%;font-weight:normal;color:white}#menubar a:link.topcat:hover,#menubar a:link.topcat:focus,#menubar a:visited.topcat:hover,#menubar a:visited.topcat:focus{background:#ffb400;color:black}#menubar a:link.topcat.active,#menubar a:visited.topcat.active{background:#ffb400;color:black;font-weight:bold}#menubar div.hostinfo{position:relative;margin:0;padding:0.5em;flex:1;font-weight:bold;font-size:80%}#menubar div.hostinfo a:link,#menubar div.hostinfo a:visited{text-decoration:none;font-weight:bold;color:white}#menubar div.hostinfo a:link:hover,#menubar div.hostinfo a:link:focus,#menubar div.hostinfo a:visited:hover,#menubar div.hostinfo a:visited:focus{text-decoration:underline}#topmenu{list-style:none;margin:0;padding:0}#topmenu li{display:inline-block}#maincontent{padding:0 1em 2em;max-width:60em;min-width:40em;margin:1em auto}#maincontent p{margin-bottom:1em}.gluon-section{margin:0;padding:0;border:none;margin-bottom:1.3em}.gluon-section:last-child{margin-bottom:0.7em}.gluon-section legend{font-size:1.4em;font-weight:bold;position:relative;padding:0;margin-bottom:0.5em}.gluon-section h2{margin:0em 0 0.5em -0.5em !important}.gluon-section h3{text-decoration:none !important;font-weight:bold !important;color:#555555 !important;margin:0.25em !important;font-size:100% !important}.gluon-section-descr{margin-bottom:2em}.gluon-osm-map{width:100%;height:40em;margin-bottom:1em}input:placeholder{color:#aaaaaa}input:-webkit-input-placeholder{color:#aaaaaa}input:-moz-placeholder{color:#aaaaaa}input:-ms-input-placeholder{color:#aaaaaa}input[type=checkbox]{display:none}input[type=checkbox]+label{display:inline-block;position:relative;width:1em;height:1em;margin:0}input[type=checkbox]:checked+label:after{content:'✔';color:#dc0067;vertical-align:middle;position:absolute;top:50%;left:0;margin-top:-0.5em;width:100%;text-align:center;font-size:1.7em}input[type=radio]{display:none}input[type=radio]+label{display:inline-block;position:relative;width:0.8em;height:0.8em;padding:0.5em;margin:0.2em 0.2em 0.2em 0.1em;border:none;background:#ffe199;vertical-align:middle;border-radius:50%}input[type=radio]:checked+label:after{content:'•';color:#dc0067;vertical-align:middle;position:absolute;top:50%;left:0;margin-top:-0.4em;width:100%;text-align:center;font-size:2em}input[type=submit],input[type=reset],input[type=image],input[type=button]{cursor:pointer}select,input,textarea,input[type=checkbox]+label{color:#003247;border:none;background:#ffe199;border-radius:3pt;padding:0.5em;margin-top:1px;margin-bottom:2px;box-sizing:content-box;outline:0}option{color:#003247;background:#ffe199}input[type=image]{border:none}select,input[type=text],input[type=password]{min-width:20em}input.gluon-button{display:inline-block;zoom:1;line-height:normal;white-space:nowrap;vertical-align:baseline;text-align:center;cursor:pointer;user-select:none;font-size:100%;padding:0.5em 1em;color:rgba(0,0,0,0.8);border:none transparent;background-color:#E6E6E6;text-decoration:none;border-radius:2px;transition:0.1s linear box-shadow;margin-left:0.5em;background-repeat:no-repeat}input.gluon-button::-moz-focus-inner{padding:0;border:0}input.gluon-button:active{box-shadow:0 0 0 1px rgba(0,0,0,0.15) inset,0 0 6px rgba(0,0,0,0.2) inset}input.gluon-button:focus{outline:0}input.gluon-button:hover,input.gluon-button:focus{background-image:linear-gradient(transparent, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.1))}input.gluon-button[disabled]{border:none;background-image:none;opacity:0.40;cursor:not-allowed;box-shadow:none}input.gluon-button-reset{background-color:#e30;color:#fff}input.gluon-button-submit{background-color:#009ee0;color:#fff}input.gluon-button-submit:active{background:grey}.gluon-input-invalid{background:#e30 !important;color:white}div.gluon-section-remove input{border-bottom:none}textarea{margin-left:-1px;margin-bottom:0.5em}.gluon-section .gluon-rowstyle-1 h3{background-color:#eeeeff;color:#555555}.gluon-rowstyle-2{color:#000000}div.gluon-value{display:flex;flex-direction:row;margin-bottom:0.5em}.gluon-section-node .gluon-value:last-child{margin-bottom:0}.gluon-value-title{flex:2;text-align:right;padding-top:0.39em;padding-right:1em;font-weight:bold}div.gluon-value-field{flex:3;position:relative}div.gluon-value-field input,div.gluon-value-field select,div.gluon-value-field input+label{position:relative}div.gluon-value-field-text{flex:3;padding-top:0.39em}div.gluon-value-field-long{flex:10;position:relative;margin-top:0.65em}div.gluon-value-field-long input,div.gluon-value-field-long select,div.gluon-value-field-long input+label{position:relative}div.gluon-value-field-long-after{flex:2}div.gluon-value-description{font-size:8pt}div.gluon-section-create{clear:left;white-space:nowrap;vertical-align:top}div.gluon-section-create .gluon-button{margin:0.25em}input.gluon-section-create-name{margin-right:-0.25em}div.gluon-form-descr{margin-bottom:1em}.gluon-form-descr:empty,.gluon-section-descr:empty{display:none}.gluon-form-descr,.gluon-section-descr,.gluon-page-actions{padding:1em;background:#ececec}.gluon-page-actions{text-align:right;display:flex;flex-flow:row-reverse}div.gluon-optionals{padding:0.25em;border-bottom:1px dotted #bbbbbb}div.gluon-section-remove{float:right}.gluon-section-node{clear:both;position:relative;border:none}.gluon-section-node-tabbed{border-top-left-radius:0}div.gluon-error{font-size:95%;font-weight:bold;color:#ff0000;background-color:#ffffff}.gluon-value-error input,.gluon-value-error select{background-color:#ffcccc}.gluon-section-error{color:red;background-color:white;font-size:95%;border:1px dotted red;margin:3px;padding:3px}.gluon-value-field var{color:#2222FF}.gluon-add:after,.gluon-remove:after{cursor:pointer;display:inline-block;text-align:center;vertical-align:middle;font-size:180%;width:1.2em;height:1em}.gluon-add{color:#008000;position:relative;left:21em}input+.gluon-add{left:0;top:0.04em}.gluon-add:first-child{top:0.53em;left:-0.08em}.gluon-add:after{content:'+'}.gluon-remove{color:#800000;position:relative;top:-0.03em}.gluon-remove:after{content:'–'}.left{text-align:left !important}.right{text-align:right !important}.inline{display:inline}.error500{border:1px dotted #ff0000;background-color:#ffffff;color:#000000;padding:0.5em}.errorbox{border:1px solid #FF0000;background-color:#FFCCCC;padding:5px;margin-bottom:5px}.errorbox a{color:#000000 !important}.the-key{text-align:left;font-size:1.4em;background:#ffe9b3;border:3pt dashed #dc0067;margin-bottom:0.5em;padding:0.5em}
html{min-height:100%;height:auto;position:relative}body,input,select,option{font-family:'Open Sans', Arial, sans-serif;font-size:12pt}body{color:#4d4e53;line-height:1.5em;margin:0;display:flex;flex-direction:column;min-height:100vh;background-color:#f3f3f3}.tabmenu1{text-align:center}ul.tabmenu{list-style:none;padding:0;margin:2em 0;display:inline-flex}ul.tabmenu li{white-space:nowrap;margin:0 0.5em;padding:0;text-align:center}ul.tabmenu li a{display:block;text-decoration:none;padding:1em;margin:0;color:#333;border-radius:2em}ul.tabmenu li a:hover{background:#ffe9b3}ul.tabmenu li.active a{font-weight:bold;background:white;color:#333}#maincontent ul{margin-left:2em}.error{color:#ff0000;background-color:white}#menubar{display:flex;background:#dc0067;color:#ffffff}#menubar a:link.topcat,#menubar a:visited.topcat{position:relative;display:block;padding:0.5em;text-decoration:none;font-size:80%;font-weight:normal;color:white}#menubar a:link.topcat:hover,#menubar a:link.topcat:focus,#menubar a:visited.topcat:hover,#menubar a:visited.topcat:focus{background:#ffb400;color:black}#menubar a:link.topcat.active,#menubar a:visited.topcat.active{background:#ffb400;color:black;font-weight:bold}#menubar .hostinfo{position:relative;margin:0;padding:0.5em;flex:1;font-weight:bold;font-size:80%}#menubar .hostinfo a:link,#menubar .hostinfo a:visited{text-decoration:none;font-weight:bold;color:white}#menubar .hostinfo a:link:hover,#menubar .hostinfo a:link:focus,#menubar .hostinfo a:visited:hover,#menubar .hostinfo a:visited:focus{text-decoration:underline}#topmenu{list-style:none;margin:0;padding:0}#topmenu li{display:inline-block}#maincontent{padding:0 1em 2em;max-width:60em;min-width:40em;margin:1em auto}#maincontent p{margin-bottom:1em}.gluon-section{margin:0;padding:0;border:none;margin-bottom:1.3em}.gluon-section:last-child{margin-bottom:0.7em}.gluon-section legend{font-size:1.4em;font-weight:bold;position:relative;padding:0;margin-bottom:0.5em}.gluon-section h2{margin:0em 0 0.5em -0.5em}.gluon-section h3{text-decoration:none;font-weight:bold;color:#555555;margin:0.25em;font-size:100%}.gluon-section-descr,.gluon-warning{margin-bottom:2em}.gluon-osm-map{width:100%;height:40em;margin-bottom:1em}input::placeholder{color:#aaaaaa}input::-webkit-input-placeholder{color:#aaaaaa}input[type=checkbox]{display:none}input[type=checkbox]+label{display:inline-block;position:relative;width:1em;height:1em;margin:0}input[type=checkbox]:checked+label::after{content:'✔';color:#dc0067;vertical-align:middle;position:absolute;top:50%;left:0;margin-top:-0.5em;width:100%;text-align:center;font-size:1.7em}input[type=checkbox][disabled]+label{background-color:#dcdcdc !important}input[type=radio]{display:none}input[type=radio]+label{display:inline-block;position:relative;width:0.8em;height:0.8em;padding:0.5em;margin:0.2em 0.2em 0.2em 0.1em;border:none;background:#ffe199;vertical-align:middle;border-radius:50%}input[type=radio]:checked+label::after{content:'•';color:#dc0067;vertical-align:middle;position:absolute;top:50%;left:0;margin-top:-0.4em;width:100%;text-align:center;font-size:2em}input[type=submit],input[type=reset],input[type=button]{cursor:pointer}select,input,textarea,input[type=checkbox]+label{color:#003247;border:none;background:#ffe199;border-radius:3pt;padding:0.5em;margin-top:1px;margin-bottom:2px;box-sizing:content-box;outline:0}.select-wrapper{position:relative;display:inline-block}.select-wrapper::before{position:absolute;z-index:1;right:0.05em;top:calc(2px + 0.1em);bottom:calc(2px + 0.1em);width:1.4em;border-left:0.05em solid rgba(0,0,0,0.25);pointer-events:none;background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="8" height="5"><path fill="none" stroke="black" stroke-linejoin="bevel" d="M1,1L4,4L7,1"/></svg>') center/0.8em 0.5em no-repeat;content:''}.select-wrapper select{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}option{color:#003247;background:#ffe199}select,input[type=text],input[type=password]{min-width:20em}.gluon-multi-list-option-descr{display:inline-block;vertical-align:top;margin-top:0.35em;margin-left:0.4em}.gluon-button{display:inline-block;line-height:normal;white-space:nowrap;vertical-align:baseline;text-align:center;cursor:pointer;user-select:none;font-size:100%;padding:0.5em 1em;color:rgba(0,0,0,0.8);background-color:#E6E6E6;border:none;text-decoration:none;border-radius:2px;transition:0.1s linear box-shadow;margin-left:0.5em;background-repeat:no-repeat}.gluon-button::-moz-focus-inner{padding:0;border:0}.gluon-button:active{box-shadow:0 0 0 1px rgba(0,0,0,0.15) inset,0 0 6px rgba(0,0,0,0.2) inset}.gluon-button:focus{outline:0}.gluon-button:hover,.gluon-button:focus{background-image:linear-gradient(transparent, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.1))}.gluon-button[disabled]{border:none;background-image:none;opacity:0.40;cursor:not-allowed;box-shadow:none}.gluon-button-reset{background-color:#e30;color:#fff}.gluon-button-submit{background-color:#009ee0;color:#fff}.gluon-button-submit:active{background:grey}.gluon-input-invalid{background:#e30 !important;color:white}textarea{margin-left:-1px;margin-bottom:0.5em}.gluon-value{display:flex;flex-direction:row;margin-bottom:0.5em}.gluon-section-node .gluon-value:last-child{margin-bottom:0}.gluon-value-title{flex:2;text-align:right;padding-top:0.39em;padding-right:1em;font-weight:bold}.gluon-value-field{flex:3;position:relative}.gluon-value-field input,.gluon-value-field select,.gluon-value-field input+label{position:relative}.gluon-value-field-text{flex:3;padding-top:0.39em}.gluon-value-field-long{flex:10;position:relative;margin-top:0.65em}.gluon-value-field-long input,.gluon-value-field-long select,.gluon-value-field-long input+label{position:relative}.gluon-value-field-long-after{flex:2}.gluon-value-description{font-size:8pt}.gluon-form-descr{margin-bottom:1em}.gluon-form-descr:empty,.gluon-section-descr:empty,.gluon-warning:empty{display:none}.gluon-form-descr,.gluon-section-descr,.gluon-warning,.gluon-page-actions{padding:1em;background:#ececec}.gluon-page-actions{text-align:right;display:flex;flex-flow:row-reverse}.gluon-section-node{clear:both;position:relative;border:none}.gluon-value-error input,.gluon-value-error select{background-color:#ffcccc}.gluon-add::after,.gluon-remove::after{cursor:pointer;display:inline-block;text-align:center;vertical-align:middle;font-size:180%;width:1.2em;height:1em}.gluon-add{color:#008000;position:relative;left:21em}input+.gluon-add{left:0;top:0.04em}.gluon-add:first-child{top:0.53em;left:-0.08em}.gluon-add::after{content:'+'}.gluon-remove{color:#800000;position:relative;top:-0.03em}.gluon-remove::after{content:'–'}.gluon-warning{background:#ffe9b3}.error500{border:1px dotted #ff0000;background-color:#ffffff;color:#000000;padding:0.5em}.errorbox{border:1px solid #FF0000;background-color:#FFCCCC;padding:5px;margin-bottom:5px}.errorbox a{color:#000000 !important}.the-key{text-align:left;font-size:1.4em;background:#ffe9b3;border:3pt dashed #dc0067;margin-bottom:0.5em;padding:0.5em}
......@@ -6,7 +6,7 @@
sass --sourcemap=none -C -t compressed sass/gluon.scss files/lib/gluon/config-mode/www/static/gluon.css
When commiting changes to this file make sure to commit the respective
When committing changes to this file make sure to commit the respective
changes to the compilid version within the same commit!
*/
......@@ -24,7 +24,6 @@ $red: #ee3300;
}
display: inline-block;
zoom: 1;
line-height: normal;
white-space: nowrap;
vertical-align: baseline;
......@@ -36,8 +35,8 @@ $red: #ee3300;
font-size: 100%;
padding: 0.5em 1em;
color: rgba(0, 0, 0, 0.80);
border: none rgba(0, 0, 0, 0);
background-color: #E6E6E6;
border: none;
text-decoration: none;
border-radius: 2px;
......@@ -65,20 +64,6 @@ $red: #ee3300;
}
}
@mixin button-primary {
background-color: $ffzusatz;
color: #fff;
}
.lang_he {
direction: RTL;
unicode-bidi: embed;
}
.hidden {
display: none;
}
html {
min-height: 100%;
height: auto;
......@@ -100,11 +85,6 @@ body {
background-color: #f3f3f3;
}
a img {
border: none;
text-decoration: none;
}
.tabmenu1 {
text-align: center;
}
......@@ -142,38 +122,10 @@ ul.tabmenu li {
}
}
abbr,
acronym {
font-style: normal;
font-variant: normal;
}
abbr[title],
acronym[title] {
border-bottom: 1px dotted;
cursor: help;
}
a:link abbr[title],
a:visited abbr[title],
a:link acronym[title],
a:visited acronym[title] {
cursor: pointer;
}
code {
font-family: monospace;
white-space: pre;
}
#maincontent ul {
margin-left: 2em;
}
.clear {
clear: both;
}
.error {
color: #ff0000;
background-color: white;
......@@ -207,7 +159,7 @@ code {
}
}
#menubar div.hostinfo {
#menubar .hostinfo {
position: relative;
margin: 0;
padding: 0.5em;
......@@ -216,7 +168,7 @@ code {
font-size: 80%;
}
#menubar div.hostinfo a {
#menubar .hostinfo a {
&:link, &:visited {
text-decoration: none;
font-weight: bold;
......@@ -269,15 +221,15 @@ code {
}
.gluon-section h2 {
margin: 0em 0 0.5em -0.5em !important;
margin: 0em 0 0.5em -0.5em;
}
.gluon-section h3 {
text-decoration: none !important;
font-weight: bold !important;
color: #555555 !important;
margin: 0.25em !important;
font-size: 100% !important;
text-decoration: none;
font-weight: bold;
color: #555555;
margin: 0.25em;
font-size: 100%;
}
.gluon-section-descr {
......@@ -290,19 +242,11 @@ code {
margin-bottom: 1em;
}
input:placeholder {
color: #aaaaaa;
}
input:-webkit-input-placeholder {
color: #aaaaaa;
}
input:-moz-placeholder {
input::placeholder {
color: #aaaaaa;
}
input:-ms-input-placeholder {
input::-webkit-input-placeholder {
color: #aaaaaa;
}
......@@ -317,7 +261,7 @@ input[type=checkbox] {
margin: 0;
}
&:checked + label:after {
&:checked + label::after {
content: '✔';
color: $ffmagenta;
vertical-align: middle;
......@@ -329,6 +273,10 @@ input[type=checkbox] {
text-align: center;
font-size: 1.7em;
}
&[disabled] + label {
background-color: #dcdcdc !important;
}
}
input[type=radio] {
......@@ -347,7 +295,7 @@ input[type=radio] {
border-radius: 50%;
}
&:checked + label:after {
&:checked + label::after {
content: '•';
color: $ffmagenta;
vertical-align: middle;
......@@ -363,7 +311,6 @@ input[type=radio] {
input[type=submit],
input[type=reset],
input[type=image],
input[type=button] {
cursor: pointer;
}
......@@ -383,37 +330,70 @@ input[type=checkbox] + label {
outline: 0;
}
.select-wrapper {
position: relative;
display: inline-block;
&::before {
position: absolute;
z-index: 1;
right: 0.05em;
top: calc(2px + 0.1em);
bottom: calc(2px + 0.1em);
width: 1.4em;
border-left: 0.05em solid rgba(0, 0, 0, 0.25);
pointer-events: none;
background:
url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="8" height="5"><path fill="none" stroke="black" stroke-linejoin="bevel" d="M1,1L4,4L7,1"/></svg>')
center / 0.8em 0.5em
no-repeat
;
content: '';
}
select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
cursor: pointer;
}
}
option {
color: darken($ffzusatz, 30);
background: lighten($ffyellow, 30);
}
input[type=image] {
border: none;
}
select,
input[type=text],
input[type=password] {
min-width: 20em;
}
input.gluon-button {
.gluon-multi-list-option-descr {
display: inline-block;
vertical-align: top;
margin-top: 0.35em;
margin-left: 0.4em;
}
.gluon-button {
@include button;
margin-left: 0.5em;
background-repeat: no-repeat;
}
input.gluon-button-reset {
.gluon-button-reset {
background-color: $red;
color: #fff;
}
input.gluon-button-submit {
@include button-primary;
}
input.gluon-button-submit:active {
.gluon-button-submit {
background-color: $ffzusatz;
color: #fff;
}
.gluon-button-submit:active {
background: grey;
}
......@@ -422,25 +402,12 @@ input.gluon-button-submit:active {
color: white;
}
div.gluon-section-remove input {
border-bottom: none;
}
textarea {
margin-left: -1px;
margin-bottom: 0.5em;
}
.gluon-section .gluon-rowstyle-1 h3 {
background-color: #eeeeff;
color: #555555;
}
.gluon-rowstyle-2 {
color: #000000;
}
div.gluon-value {
.gluon-value {
display: flex;
flex-direction: row;
margin-bottom: 0.5em;
......@@ -458,7 +425,7 @@ div.gluon-value {
font-weight: bold;
}
div.gluon-value-field {
.gluon-value-field {
flex: 3;
position: relative;
......@@ -467,12 +434,12 @@ div.gluon-value-field {
}
}
div.gluon-value-field-text {
.gluon-value-field-text {
flex: 3;
padding-top: 0.39em;
}
div.gluon-value-field-long {
.gluon-value-field-long {
flex: 10;
position: relative;
margin-top: 0.65em;
......@@ -482,29 +449,15 @@ div.gluon-value-field-long {
}
}
div.gluon-value-field-long-after {
.gluon-value-field-long-after {
flex: 2;
}
div.gluon-value-description {
.gluon-value-description {
font-size: 8pt;
}
div.gluon-section-create {
clear: left;
white-space: nowrap;
vertical-align: top;
}
div.gluon-section-create .gluon-button {
margin: 0.25em;
}
input.gluon-section-create-name {
margin-right: -0.25em;
}
div.gluon-form-descr {
.gluon-form-descr {
margin-bottom: 1em;
}
......@@ -523,51 +476,18 @@ div.gluon-form-descr {
flex-flow: row-reverse;
}
div.gluon-optionals {
padding: 0.25em;
border-bottom: 1px dotted #bbbbbb;
}
div.gluon-section-remove {
float: right;
}
.gluon-section-node {
clear: both;
position: relative;
border: none;
}
.gluon-section-node-tabbed {
border-top-left-radius: 0;
}
div.gluon-error {
font-size: 95%;
font-weight: bold;
color: #ff0000;
background-color: #ffffff;
}
.gluon-value-error input,
.gluon-value-error select {
background-color: #ffcccc;
}
.gluon-section-error {
color: red;
background-color: white;
font-size: 95%;
border: 1px dotted red;
margin: 3px;
padding: 3px;
}
.gluon-value-field var {
color: #2222FF;
}
.gluon-add:after, .gluon-remove:after {
.gluon-add::after, .gluon-remove::after {
cursor: pointer;
display: inline-block;
text-align: center;
......@@ -593,7 +513,7 @@ div.gluon-error {
left: -0.08em;
}
&:after {
&::after {
content: '+';
}
}
......@@ -604,21 +524,14 @@ div.gluon-error {
position: relative;
top: -0.03em;
&:after {
&::after {
content: '–';
}
}
.left {
text-align: left !important;
}
.right {
text-align: right !important;
}
.inline {
display: inline;
.gluon-warning {
@extend .gluon-section-descr;
background: lighten($ffyellow, 35);
}
.error500 {
......
config KERNEL_NET_IP_TUNNEL
bool
config KERNEL_NET_UDP_TUNNEL
bool
config KERNEL_VXLAN
bool
select KERNEL_NET_IP_TUNNEL
select KERNEL_NET_UDP_TUNNEL
config KERNEL_VETH
bool
# for fastd
config KERNEL_TUN
bool
# for tunneldigger
config KERNEL_L2TP_V3
bool
config KERNEL_L2TP_IP
bool
config KERNEL_L2TP_ETH
bool
config KERNEL_L2TP
bool
select KERNEL_L2TP_V3
select KERNEL_L2TP_IP
select KERNEL_L2TP_ETH
# for simple-tc
config KERNEL_NET_SCHED
bool
config KERNEL_NET_CLS
bool
select KERNEL_NET_SCHED
config KERNEL_NET_CLS_ACT
bool
select KERNEL_NET_CLS
config KERNEL_NET_ACT_POLICE
bool
select KERNEL_NET_CLS_ACT
config KERNEL_NET_CLS_BASIC
bool
select KERNEL_NET_CLS
config KERNEL_NET_SCH_TBF
bool
select KERNEL_NET_SCHED
config KERNEL_NET_SCH_INGRESS
bool
select KERNEL_NET_CLS_ACT
# for batman-adv
config KERNEL_DUMMY
bool
config KERNEL_CRC16
bool
config KERNEL_LIBCRC32C
bool
# Netfilter modules used by ebtables and fw3
config KERNEL_NETFILTER
bool
config KERNEL_NETFILTER_ADVANCED
bool
select KERNEL_NETFILTER
config KERNEL_NETFILTER_XTABLES
bool
select KERNEL_NETFILTER_ADVANCED
config KERNEL_BRIDGE_NF_EBTABLES
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_BRIDGE_EBT_T_FILTER
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_T_NAT
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_ARP
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_DNAT
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_IP
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_IP6
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_LIMIT
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_MARK
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_MARK_T
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_REDIRECT
bool
select KERNEL_BRIDGE_NF_EBTABLES
# Not all of the following modules are really required for Gluon, but fw3 pulls
# them in, so we add them to the kernel config to reduce the number of loaded
# modules
# kmod-nf-conntrack
config KERNEL_NF_CONNTRACK
bool
select KERNEL_NETFILTER_ADVANCED
config KERNEL_NF_CONNTRACK_RTCACHE
bool
select KERNEL_NF_CONNTRACK
config KERNEL_NF_CONNTRACK_IPV4
bool
select KERNEL_NF_CONNTRACK
# kmod-nf-conntrack6
config KERNEL_NF_CONNTRACK_IPV6
bool
select KERNEL_NF_CONNTRACK
# kmod-nf-ipt
config KERNEL_NF_REJECT_IPV4
bool
select KERNEL_NETFILTER_ADVANCED
config KERNEL_IP_NF_IPTABLES
bool
select KERNEL_NETFILTER_XTABLES
select KERNEL_NF_REJECT_IPV4
# kmod-nf-ipt6
config KERNEL_NF_REJECT_IPV6
bool
select KERNEL_NETFILTER_ADVANCED
config KERNEL_IP6_NF_IPTABLES
bool
select KERNEL_NETFILTER_XTABLES
select KERNEL_NF_REJECT_IPV6
# kmod-nf-nat
config KERNEL_NF_NAT
bool
select KERNEL_NF_CONNTRACK
config KERNEL_NF_NAT_REDIRECT
bool
select KERNEL_NF_NAT
config KERNEL_NF_NAT_IPV4
bool
select KERNEL_NETFILTER_ADVANCED
select KERNEL_NF_NAT
config KERNEL_NF_NAT_MASQUERADE_IPV4
bool
select KERNEL_NF_NAT_IPV4
# kmod-ipt-core
config KERNEL_IP_NF_FILTER
bool
select KERNEL_IP_NF_IPTABLES
config KERNEL_IP_NF_MANGLE
bool
select KERNEL_IP_NF_IPTABLES
config KERNEL_IP_NF_TARGET_REJECT
bool
select KERNEL_IP_NF_FILTER
config KERNEL_NETFILTER_XT_MATCH_LIMIT
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_MAC
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_MULTIPORT
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_COMMENT
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_TIME
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MARK
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_TARGET_LOG
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_TARGET_TCPMSS
bool
select KERNEL_NETFILTER_XTABLES
# kmod-ip6tables
config KERNEL_IP6_NF_FILTER
bool
select KERNEL_IP6_NF_IPTABLES
config KERNEL_IP6_NF_MANGLE
bool
select KERNEL_IP6_NF_IPTABLES
config KERNEL_IP6_NF_TARGET_REJECT
bool
select KERNEL_IP6_NF_IPTABLES
# kmod-ipt-conntrack
config KERNEL_NETFILTER_XT_MATCH_STATE
bool
select KERNEL_NETFILTER_XTABLES
select KERNEL_NF_CONNTRACK
config KERNEL_NETFILTER_XT_MATCH_CONNTRACK
bool
select KERNEL_NETFILTER_XTABLES
select KERNEL_NF_CONNTRACK
config KERNEL_IP_NF_RAW
bool
select KERNEL_IP_NF_IPTABLES
config KERNEL_NETFILTER_XT_TARGET_CT
bool
select KERNEL_NETFILTER_XTABLES
select KERNEL_NF_CONNTRACK
select KERNEL_IP_NF_RAW
# kmod-ipt-nat
config KERNEL_IP_NF_NAT
bool
select KERNEL_NF_NAT
select KERNEL_IP_NF_IPTABLES
config KERNEL_IP_NF_TARGET_MASQUERADE
bool
select KERNEL_NF_NAT_MASQUERADE_IPV4
select KERNEL_IP_NF_NAT
config KERNEL_IP_NF_TARGET_REDIRECT
bool
select KERNEL_NF_NAT
select KERNEL_IP_NF_NAT
# kmod-ipt-extra
config KERNEL_NETFILTER_XT_MATCH_ADDRTYPE
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_OWNER
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_PKTTYPE
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_QUOTA
bool
select KERNEL_NETFILTER_XTABLES
config GLUON_SPECIALIZE_KERNEL
bool "Specialize kernel for Gluon"
select KERNEL_VXLAN
select KERNEL_NF_CONNTRACK_RTCACHE
select KERNEL_NF_CONNTRACK_IPV4
select KERNEL_NF_CONNTRACK_IPV6
select KERNEL_IP_NF_IPTABLES
select KERNEL_IP6_NF_IPTABLES
select KERNEL_NF_NAT_REDIRECT
select KERNEL_NF_NAT_IPV4
select KERNEL_NF_NAT_MASQUERADE_IPV4
select KERNEL_IP_NF_FILTER
select KERNEL_IP_NF_MANGLE
select KERNEL_IP_NF_TARGET_REJECT
select KERNEL_IP6_NF_FILTER
select KERNEL_IP6_NF_MANGLE
select KERNEL_IP6_NF_TARGET_REJECT
select KERNEL_NETFILTER_XT_MATCH_LIMIT
select KERNEL_NETFILTER_XT_MATCH_MAC
select KERNEL_NETFILTER_XT_MATCH_MULTIPORT
select KERNEL_NETFILTER_XT_MATCH_COMMENT
select KERNEL_NETFILTER_XT_MATCH_TIME
select KERNEL_NETFILTER_XT_MARK
select KERNEL_NETFILTER_XT_TARGET_LOG
select KERNEL_NETFILTER_XT_TARGET_TCPMSS
select KERNEL_NETFILTER_XT_MATCH_STATE
select KERNEL_NETFILTER_XT_MATCH_CONNTRACK
select KERNEL_NETFILTER_XT_TARGET_CT
select KERNEL_IP_NF_NAT
select KERNEL_IP_NF_TARGET_MASQUERADE
select KERNEL_IP_NF_TARGET_REDIRECT
config GLUON_MINIFY
bool "Minify Gluon scripts"
default y
......@@ -2,10 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-core
GLUON_VERSION = $(shell git describe --always --dirty=+ 2>/dev/null || echo unknown)
PKG_VERSION:=$(if $(DUMP),x,$(GLUON_VERSION))
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_CONFIG_DEPENDS := CONFIG_GLUON_VERSION
include ../gluon.mk
include $(INCLUDE_DIR)/cmake.mk
......@@ -14,7 +11,7 @@ define Package/gluon-core
TITLE:=Base files of Gluon
DEPENDS:= \
+gluon-site +libgluonutil +libiwinfo-lua +lua-platform-info +lua-simple-uci +lua-hash +lua-jsonc \
+luabitop +luaposix +vxlan +odhcp6c +firewall +pretty-hostname
+lua-bit32 +luaposix +vxlan +odhcp6c +firewall +pretty-hostname
endef
define Package/gluon-core/description
......@@ -22,14 +19,25 @@ define Package/gluon-core/description
endef
define Package/gluon-core/config
source "$(SOURCE)/Config.in"
config GLUON_VERSION
string "Gluon version number"
depends on PACKAGE_gluon-core
default ""
config GLUON_MINIFY
bool "Minify Gluon scripts"
default y
endef
define Package/gluon-core/conffiles
/etc/config/gluon
endef
define Package/gluon-core/install
$(Gluon/Build/Install)
$(INSTALL_DIR) $(1)/lib/gluon
echo '$(GLUON_VERSION)' > $(1)/lib/gluon/gluon-version
echo '$(call qstrip,$(CONFIG_GLUON_VERSION))' > $(1)/lib/gluon/gluon-version
endef
$(eval $(call BuildPackageGluon,gluon-core))
......@@ -26,7 +26,9 @@ need_string(in_site({'timezone'}))
need_string_array({'ntp_servers'}, false)
need_string_match(in_domain({'prefix4'}), '^%d+.%d+.%d+.%d+/%d+$', false)
need_string_match(in_domain({'prefix6'}), '^[%x:]+/64$')
need_string_array_match(in_domain({'extra_prefixes6'}), '^[%x:]+/%d+$', false)
local supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000}
for _, config in ipairs({'wifi24', 'wifi5'}) do
......@@ -64,6 +66,7 @@ need_boolean(in_site({'poe_passthrough'}), false)
if need_table({'dns'}, nil, false) then
need_string_array_match({'dns', 'servers'}, '^[%x:]+$')
need_number({'dns', 'cacheentries'}, false)
end
need_string_array(in_domain({'next_node', 'name'}), false)
......@@ -72,6 +75,15 @@ need_string_match(in_domain({'next_node', 'ip4'}), '^%d+.%d+.%d+.%d+$', false)
need_boolean(in_domain({'mesh', 'vxlan'}), false)
need_boolean(in_site({'mesh_on_wan'}), false)
need_boolean(in_site({'mesh_on_lan'}), false)
need_boolean(in_site({'single_as_lan'}), false)
local interfaces_roles = {'client', 'uplink', 'mesh'}
for _, config in ipairs({'wan', 'lan', 'single'}) do
local default_roles = in_site({'interfaces', config, 'default_roles'})
need_array_of(default_roles, interfaces_roles, false)
need_array_elements_exclusive(default_roles, 'client', 'mesh', false)
need_array_elements_exclusive(default_roles, 'client', 'uplink', false)
end
obsolete({'mesh_on_wan'}, 'Use interfaces.wan.default_roles.')
obsolete({'mesh_on_lan'}, 'Use interfaces.lan.default_roles.')
obsolete({'single_as_lan'}, 'Use interfaces.single.default_roles.')
config wireless
#!/bin/sh
[ -e "/lib/firmware/$FIRMWARE" ] && exit 0
case "$FIRMWARE" in
ath10k/fwcfg*)
cp "/lib/gluon/ath10k-fwcfg.txt" "/lib/firmware/$FIRMWARE"
;;
esac
#!/bin/sh /etc/rc.common
# Start right after S10boot
START=10
start() {
config_load gluon
config_get_bool reconfigure core reconfigure 0
# shellcheck disable=SC2154
if [ "$reconfigure" = 1 ]; then
gluon-reconfigure
fi
}
#!/bin/sh
# Work around an issue with wifi setup timing by waiting a bit
# while device initialisation is ongoing.
# https://github.com/freifunk-gluon/gluon/issues/2779
sleep 3
gluon-reconfigure
exit 0
vdevs = 4
peers = 96
active_peers = 96
stations = 96