diff --git a/contrib/lsupgrade.sh b/contrib/lsupgrade.sh index f8e28f9a..284fe44b 100755 --- a/contrib/lsupgrade.sh +++ b/contrib/lsupgrade.sh @@ -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 diff --git a/package/gluon-core/Makefile b/package/gluon-core/Makefile index c56b78bb..93b2d599 100644 --- a/package/gluon-core/Makefile +++ b/package/gluon-core/Makefile @@ -31,7 +31,6 @@ endef define Package/gluon-core/conffiles /etc/config/gluon -/etc/config/gluon-core endef define Package/gluon-core/install diff --git a/package/gluon-core/files/etc/config/gluon-core b/package/gluon-core/files/etc/config/gluon-core deleted file mode 100644 index 9787ccc9..00000000 --- a/package/gluon-core/files/etc/config/gluon-core +++ /dev/null @@ -1 +0,0 @@ -config wireless diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/wireless.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/wireless.lua index 3e0696aa..62fe3228 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/wireless.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/wireless.lua @@ -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() diff --git a/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/400-mesh-vpn-fastd b/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/400-mesh-vpn-fastd index 4d56be2a..5fed1e8c 100755 --- a/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/400-mesh-vpn-fastd +++ b/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/400-mesh-vpn-fastd @@ -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(), diff --git a/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/410-mesh-vpn-fastd-generate-secret b/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/410-mesh-vpn-fastd-generate-secret deleted file mode 100755 index f43e8b1f..00000000 --- a/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/410-mesh-vpn-fastd-generate-secret +++ /dev/null @@ -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 diff --git a/package/gluon-mesh-vpn-tunneldigger/luasrc/lib/gluon/upgrade/400-mesh-vpn-tunneldigger b/package/gluon-mesh-vpn-tunneldigger/luasrc/lib/gluon/upgrade/400-mesh-vpn-tunneldigger index b37bb476..9888d87e 100755 --- a/package/gluon-mesh-vpn-tunneldigger/luasrc/lib/gluon/upgrade/400-mesh-vpn-tunneldigger +++ b/package/gluon-mesh-vpn-tunneldigger/luasrc/lib/gluon/upgrade/400-mesh-vpn-tunneldigger @@ -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', diff --git a/package/gluon-node-info/luasrc/lib/gluon/upgrade/520-node-info-whitespace-fix b/package/gluon-node-info/luasrc/lib/gluon/upgrade/520-node-info-whitespace-fix deleted file mode 100755 index 62cd4beb..00000000 --- a/package/gluon-node-info/luasrc/lib/gluon/upgrade/520-node-info-whitespace-fix +++ /dev/null @@ -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 diff --git a/package/gluon-radvd/luasrc/lib/gluon/upgrade/500-radvd-remove-user b/package/gluon-radvd/luasrc/lib/gluon/upgrade/500-radvd-remove-user deleted file mode 100755 index 036406af..00000000 --- a/package/gluon-radvd/luasrc/lib/gluon/upgrade/500-radvd-remove-user +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/lua - -local users = require 'gluon.users' - -users.remove_user('gluon-radvd') diff --git a/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/310-setup-mode-migrate b/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/310-setup-mode-migrate deleted file mode 100755 index ecaa07f9..00000000 --- a/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/310-setup-mode-migrate +++ /dev/null @@ -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')