Merge pull request #2382 from freifunk-gluon/cleanup
Removal of more obsolete migrations, minor cleanup and improvements to lsupgrade.sh
This commit is contained in:
commit
1041014cf3
@ -28,7 +28,7 @@ fi
|
||||
|
||||
pushd "$(dirname "$0")/.." >/dev/null
|
||||
|
||||
find ./package packages -name Makefile | while read -r makefile; do
|
||||
find ./package packages -name Makefile | grep -v '^packages/packages/' | while read -r makefile; do
|
||||
dir="$(dirname "$makefile")"
|
||||
|
||||
pushd "$dir" >/dev/null
|
||||
@ -37,13 +37,12 @@ find ./package packages -name Makefile | while read -r makefile; do
|
||||
dirname="$(dirname "$dir" | cut -d/ -f 3-)"
|
||||
package="$(basename "$dir")"
|
||||
|
||||
for file in "${SUFFIX1}"/*; do
|
||||
echo "${GREEN}$(basename "${file}")${RESET}" "(${BLUE}${repo}${RESET}/${dirname}${dirname:+/}${RED}${package}${RESET}/${SUFFIX1})"
|
||||
done
|
||||
for file in "${SUFFIX2}"/*; do
|
||||
echo "${GREEN}$(basename "${file}")${RESET}" "(${BLUE}${repo}${RESET}/${dirname}${dirname:+/}${RED}${package}${RESET}/${SUFFIX2})"
|
||||
for file in "${SUFFIX1}"/* "${SUFFIX2}"/*; do
|
||||
basename="$(basename "${file}")"
|
||||
suffix="$(dirname "${file}")"
|
||||
printf "%s\t%s\n" "${basename}" "${BLUE}${repo}${RESET}/${dirname}${dirname:+/}${RED}${package}${RESET}/${suffix}/${GREEN}${basename}${RESET}"
|
||||
done
|
||||
popd >/dev/null
|
||||
done | sort
|
||||
done | sort | cut -f2-
|
||||
|
||||
popd >/dev/null
|
||||
|
@ -31,7 +31,6 @@ endef
|
||||
|
||||
define Package/gluon-core/conffiles
|
||||
/etc/config/gluon
|
||||
/etc/config/gluon-core
|
||||
endef
|
||||
|
||||
define Package/gluon-core/install
|
||||
|
@ -1 +0,0 @@
|
||||
config wireless
|
@ -123,7 +123,7 @@ function M.foreach_radio(uci, f)
|
||||
end
|
||||
|
||||
function M.preserve_channels(uci)
|
||||
return uci:get_first('gluon-core', 'wireless', 'preserve_channels')
|
||||
return uci:get('gluon', 'wireless', 'preserve_channels')
|
||||
end
|
||||
|
||||
function M.device_supports_wpa3()
|
||||
|
@ -9,6 +9,11 @@ local uci = require('simple-uci').cursor()
|
||||
|
||||
local syslog_level = uci:get('fastd', 'mesh_vpn', 'syslog_level') or 'verbose'
|
||||
|
||||
local secret = uci:get('fastd', 'mesh_vpn', 'secret')
|
||||
if not secret or not secret:match(('%x'):rep(64)) then
|
||||
secret = 'generate'
|
||||
end
|
||||
|
||||
local methods
|
||||
|
||||
if site.mesh_vpn.fastd.configurable(false) then
|
||||
@ -38,6 +43,7 @@ end
|
||||
uci:section('fastd', 'fastd', 'mesh_vpn', {
|
||||
group = 'gluon-mesh-vpn',
|
||||
syslog_level = syslog_level,
|
||||
secret = secret,
|
||||
interface = vpn_core.get_interface(),
|
||||
mode = 'tap',
|
||||
mtu = site.mesh_vpn.mtu(),
|
||||
|
@ -1,12 +0,0 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local uci = require 'simple-uci'
|
||||
|
||||
local c = uci.cursor()
|
||||
|
||||
local secret = c:get("fastd", "mesh_vpn", "secret")
|
||||
|
||||
if not secret or not secret:match(("%x"):rep(64)) then
|
||||
c:set("fastd", "mesh_vpn", "secret", "generate")
|
||||
c:save("fastd")
|
||||
end
|
@ -7,22 +7,7 @@ local vpn_core = require 'gluon.mesh-vpn'
|
||||
local uci = require('simple-uci').cursor()
|
||||
|
||||
|
||||
local enabled
|
||||
|
||||
-- Delete old broker config section (remove in 2019)
|
||||
if not uci:get('tunneldigger', 'mesh_vpn') then
|
||||
if uci:get_first('tunneldigger', 'broker', 'interface') == 'mesh-vpn' then
|
||||
enabled = uci:get_first('tunneldigger', 'broker', 'enabled')
|
||||
end
|
||||
|
||||
-- In the usual case (no migration from old tunneldigger package), the
|
||||
-- enabled state is set in the 500-mesh-vpn script
|
||||
|
||||
uci:delete_all('tunneldigger', 'broker')
|
||||
end
|
||||
|
||||
uci:section('tunneldigger', 'broker', 'mesh_vpn', {
|
||||
enabled = enabled,
|
||||
uuid = util.node_id(),
|
||||
interface = vpn_core.get_interface(),
|
||||
bind_interface = 'br-wan',
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/usr/bin/lua
|
||||
local uci = require('simple-uci').cursor()
|
||||
local util = require 'gluon.util'
|
||||
|
||||
local sname = uci:get_first('gluon-node-info', 'location')
|
||||
if sname then
|
||||
local options = {'longitude', 'latitude', 'altitude'}
|
||||
for _, option in ipairs(options) do
|
||||
local value = uci:get('gluon-node-info', sname, option)
|
||||
if value then
|
||||
uci:set('gluon-node-info', sname, option, util.trim(value))
|
||||
end
|
||||
end
|
||||
uci:save('gluon-node-info')
|
||||
end
|
@ -1,5 +0,0 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local users = require 'gluon.users'
|
||||
|
||||
users.remove_user('gluon-radvd')
|
@ -1,14 +0,0 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local uci = require('simple-uci').cursor()
|
||||
|
||||
|
||||
local old = uci:get_first('gluon-config-mode', 'wizard', 'configured')
|
||||
if old == '1' then
|
||||
local setup_mode = uci:get_first('gluon-setup-mode', 'setup_mode')
|
||||
uci:set('gluon-setup-mode', setup_mode, 'configured', true)
|
||||
|
||||
uci:save('gluon-setup-mode')
|
||||
end
|
||||
|
||||
os.remove('/etc/config/gluon-config-mode')
|
Loading…
Reference in New Issue
Block a user