Merge pull request #2364 from freifunk-gluon/migration-cleanup
Clean up obsolete upgrade migrations
This commit is contained in:
commit
0d0801da99
@ -1,10 +0,0 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local sysconfig = require 'gluon.sysconfig'
|
||||
local unistd = require 'posix.unistd'
|
||||
|
||||
|
||||
if unistd.access('/lib/gluon/version/core') and not sysconfig.gluon_version then
|
||||
-- This isn't an initial upgrade, so set gluon_version
|
||||
sysconfig.gluon_version = ''
|
||||
end
|
@ -22,8 +22,4 @@ if uci:get('network', 'mesh_wan', 'transitive') == nil then
|
||||
uci:set('network', 'mesh_wan', 'transitive', true)
|
||||
end
|
||||
|
||||
uci:delete('network', 'mesh_wan', 'auto')
|
||||
uci:delete('network', 'mesh_wan', 'fixed_mtu')
|
||||
uci:delete('network', 'mesh_wan', 'legacy')
|
||||
|
||||
uci:save('network')
|
||||
|
@ -50,8 +50,4 @@ if uci:get('network', 'mesh_lan', 'transitive') == nil then
|
||||
uci:set('network', 'mesh_lan', 'transitive', true)
|
||||
end
|
||||
|
||||
uci:delete('network', 'mesh_lan', 'auto')
|
||||
uci:delete('network', 'mesh_lan', 'fixed_mtu')
|
||||
uci:delete('network', 'mesh_lan', 'legacy')
|
||||
|
||||
uci:save('network')
|
||||
|
@ -1,24 +0,0 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local uci = require('simple-uci').cursor()
|
||||
|
||||
local function migrate_iface(iface)
|
||||
if iface.proto ~= 'batadv' or iface.mesh ~= 'bat0' then
|
||||
return
|
||||
end
|
||||
|
||||
local s = iface['.name']
|
||||
|
||||
uci:set('network', s, 'proto', 'gluon_mesh')
|
||||
uci:set('network', s, 'fixed_mtu', true)
|
||||
|
||||
if iface.mesh_no_rebroadcast then
|
||||
uci:set('network', s, 'transitive', iface.mesh_no_rebroadcast)
|
||||
end
|
||||
|
||||
uci:delete('network', s, 'mesh')
|
||||
uci:delete('network', s, 'mesh_no_rebroadcast')
|
||||
end
|
||||
|
||||
uci:foreach('network', 'interface', migrate_iface)
|
||||
uci:save('network')
|
@ -1,7 +0,0 @@
|
||||
#!/usr/bin/lua
|
||||
local uci = require('simple-uci').cursor()
|
||||
|
||||
uci:delete('network', 'l3roam')
|
||||
uci:delete('network', 'l3roamd_client')
|
||||
|
||||
uci:save('network')
|
@ -6,14 +6,10 @@ local util = require 'gluon.util'
|
||||
local uci = require('simple-uci').cursor()
|
||||
|
||||
|
||||
local gw_mode = uci:get('network', 'gluon_bat0', 'gw_mode') or uci:get('network', 'bat0', 'gw_mode') or 'client'
|
||||
|
||||
uci:delete('batman-adv-legacy', 'bat0')
|
||||
uci:save('batman-adv-legacy')
|
||||
|
||||
uci:delete('batman-adv', 'bat0')
|
||||
uci:save('batman-adv')
|
||||
|
||||
local gw_mode = uci:get('network', 'gluon_bat0', 'gw_mode') or 'client'
|
||||
uci:delete('network', 'gluon_bat0')
|
||||
uci:section('network', 'interface', 'gluon_bat0', {
|
||||
proto = 'gluon_bat0',
|
||||
|
@ -21,10 +21,6 @@ uci:section('network', 'interface', 'client', {
|
||||
query_response_interval = 500,
|
||||
})
|
||||
|
||||
uci:delete('network', 'client_lan')
|
||||
|
||||
uci:delete('network', 'local_node_route')
|
||||
|
||||
uci:delete('network', 'local_node_route6')
|
||||
uci:section('network', 'route6', 'local_node_route6', {
|
||||
interface = 'client',
|
||||
@ -42,6 +38,4 @@ networks = uci:get_list('firewall', 'drop', 'network')
|
||||
util.remove_from_set(networks, 'client')
|
||||
uci:set_list('firewall', 'drop', 'network', networks)
|
||||
|
||||
uci:delete('firewall', 'local_node_dns')
|
||||
|
||||
uci:save('firewall')
|
||||
|
@ -46,7 +46,6 @@ uci:section('fastd', 'fastd', 'mesh_vpn', {
|
||||
packet_mark = 1,
|
||||
status_socket = '/var/run/fastd.mesh_vpn.socket',
|
||||
})
|
||||
uci:delete('fastd', 'mesh_vpn', 'user')
|
||||
|
||||
|
||||
-- Collect list of groups that have peers with 'preserve' flag
|
||||
|
Loading…
Reference in New Issue
Block a user