소스 검색

gluon-legacy: remove package

The maintenance overhead doesn't justify keeping this old stuff anymore.
Matthias Schiffer 7 년 전
부모
커밋
6f48fc428f

+ 0 - 42
package/gluon-legacy/Makefile

@@ -1,42 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=gluon-legacy
-PKG_VERSION:=2
-
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include ../gluon.mk
-
-
-define Package/gluon-legacy
-  SECTION:=gluon
-  CATEGORY:=Gluon
-  TITLE:=Legacy update scripts
-  DEPENDS:=+gluon-core
-endef
-
-define Package/gluon-legacy/description
-	Gluon community wifi mesh firmware framework: legacy update scripts
-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-legacy/install
-	$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
-endef
-
-define Package/gluon-legacy/postinst
-#!/bin/sh
-$(call GluonCheckSite,check_site.lua)
-endef
-
-$(eval $(call BuildPackage,gluon-legacy))

+ 0 - 8
package/gluon-legacy/check_site.lua

@@ -1,8 +0,0 @@
-need_string_array 'legacy.version_files'
-need_string_array 'legacy.old_files'
-
-need_string_array 'legacy.config_mode_configs'
-need_string_array 'legacy.fastd_configs'
-need_string 'legacy.mesh_ifname'
-need_string_array 'legacy.tc_configs'
-need_string_array 'legacy.wifi_names'

+ 0 - 11
package/gluon-legacy/luasrc/lib/gluon/upgrade/000-legacy

@@ -1,11 +0,0 @@
-#!/usr/bin/lua
-
-local site = require 'gluon.site_config'
-local sysconfig = require 'gluon.sysconfig'
-
-for _, file in ipairs(site.legacy.version_files) do
-  if os.remove(file) then
-    -- Set version being upgraded from to 'legacy'
-    sysconfig.gluon_version = 'legacy'
-  end
-end

+ 0 - 39
package/gluon-legacy/luasrc/lib/gluon/upgrade/019-legacy-interfaces

@@ -1,39 +0,0 @@
-#!/usr/bin/lua
-
-local gluon_util = require 'gluon.util'
-local platform = require 'gluon.platform'
-local site = require 'gluon.site_config'
-local sysconfig = require 'gluon.sysconfig'
-
-local uci = require('luci.model.uci').cursor()
-local util = require 'luci.util'
-
-
-if sysconfig.gluon_version == 'legacy' then
-  local function iface_exists(name)
-    return (gluon_util.exec('ip', 'link', 'show', 'dev', (name:gsub('%..*$', ''))) == 0)
-  end
-
-  local function remove_bat0(iface)
-    return util.trim(string.gsub(' ' .. iface .. ' ', ' bat0 ', ' '))
-  end
-
-
-  local lan_ifname = remove_bat0(uci:get('network', site.legacy.mesh_ifname, 'ifname'))
-  local wan_ifname = uci:get('network', 'wan', 'ifname')
-
-  if wan_ifname and iface_exists(wan_ifname) then
-    sysconfig.wan_ifname = wan_ifname
-    sysconfig.lan_ifname = lan_ifname
-  else
-    sysconfig.wan_ifname = lan_ifname
-  end
-
-
-  uci:delete('network', site.legacy.mesh_ifname)
-  uci:delete('network', 'wan')
-
-  uci:save('network')
-end
-
-

+ 0 - 23
package/gluon-legacy/luasrc/lib/gluon/upgrade/210-legacy-wireless

@@ -1,23 +0,0 @@
-#!/usr/bin/lua
-
-local site = require 'gluon.site_config'
-local sysconfig = require 'gluon.sysconfig'
-
-local uci = require('luci.model.uci').cursor()
-
-
-if sysconfig.gluon_version == 'legacy' then
-  function delete_legacy_iface(iface)
-    for _, wifi in pairs(site.legacy.wifi_names) do
-      if wifi == iface['.name'] then
-	return true
-      end
-    end
-
-    return false
-  end
-
-  uci:delete_all('wireless', 'wifi-iface', delete_legacy_iface)
-
-  uci:save('wireless')
-end

+ 0 - 20
package/gluon-legacy/luasrc/lib/gluon/upgrade/290-legacy-setup-mode

@@ -1,20 +0,0 @@
-#!/usr/bin/lua
-
-local site = require 'gluon.site_config'
-local sysconfig = require 'gluon.sysconfig'
-
-local uci = require('luci.model.uci').cursor()
-
-
-if sysconfig.gluon_version == 'legacy' then
-  for _, config in ipairs(site.legacy.config_mode_configs) do
-    local old = uci:get_first(config, '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', '1')
-      uci:save('gluon-setup-mode')
-
-      break
-    end
-  end
-end

+ 0 - 28
package/gluon-legacy/luasrc/lib/gluon/upgrade/290-legacy-simple-tc

@@ -1,28 +0,0 @@
-#!/usr/bin/lua
-
-local site = require 'gluon.site_config'
-local sysconfig = require 'gluon.sysconfig'
-
-local uci = require('luci.model.uci').cursor()
-
-
-if sysconfig.gluon_version == 'legacy' then
-  for _, config in ipairs(site.legacy.tc_configs) do
-    local s = uci:get_first(config, 'bandwidth')
-    if s then
-      old = uci:get_all(config, s)
-      uci:section('simple-tc', 'interface', 'mesh_vpn',
-		{
-		  ifname = 'mesh-vpn',
-		  enabled = old.enabled,
-		  limit_ingress = old.downstream,
-		  limit_egress = old.upstream,
-		}
-      )
-
-      uci:save('simple-tc')
-
-      break
-    end
-  end
-end

+ 0 - 36
package/gluon-legacy/luasrc/lib/gluon/upgrade/390-legacy-mesh-vpn-fastd

@@ -1,36 +0,0 @@
-#!/usr/bin/lua
-
-local site = require 'gluon.site_config'
-local sysconfig = require 'gluon.sysconfig'
-
-local uci = require('luci.model.uci').cursor()
-
-
-if sysconfig.gluon_version == 'legacy' then
-  local secret
-  local enabled
-
-
-  for _, config in ipairs(site.legacy.fastd_configs) do
-    if not secret then
-      local s = uci:get_all('fastd', config)
-      if s then
-	secret = s.secret
-	enabled = s.enabled
-      end
-    end
-
-    uci:delete('fastd', config)
-  end
-
-  if secret then
-    uci:section('fastd', 'fastd', 'mesh_vpn',
-		{
-		  secret = secret,
-		  enabled = enabled,
-		}
-    )
-  end
-
-  uci:save('fastd')
-end

+ 0 - 11
package/gluon-legacy/luasrc/lib/gluon/upgrade/990-legacy-late

@@ -1,11 +0,0 @@
-#!/usr/bin/lua
-
-local site = require 'gluon.site_config'
-local sysconfig = require 'gluon.sysconfig'
-
-
-if sysconfig.gluon_version == 'legacy' then
-  for _, file in ipairs(site.legacy.old_files) do
-    os.remove(file)
-  end
-end