diff --git a/docs/site-example/site.mk b/docs/site-example/site.mk index 9f729890..f55db144 100644 --- a/docs/site-example/site.mk +++ b/docs/site-example/site.mk @@ -21,7 +21,6 @@ GLUON_SITE_PACKAGES := \ gluon-luci-autoupdater \ gluon-luci-portconfig \ gluon-luci-wifi-config \ - gluon-next-node \ gluon-mesh-vpn-fastd \ gluon-radvd \ gluon-setup-mode \ diff --git a/package/gluon-mesh-batman-adv-core/Makefile b/package/gluon-mesh-batman-adv-core/Makefile index efcf1698..25c3b9b0 100644 --- a/package/gluon-mesh-batman-adv-core/Makefile +++ b/package/gluon-mesh-batman-adv-core/Makefile @@ -13,7 +13,7 @@ define Package/gluon-mesh-batman-adv-core SECTION:=gluon CATEGORY:=Gluon TITLE:=Support for batman-adv meshing (core) - DEPENDS:=+gluon-core +libgluonutil +gluon-client-bridge +firewall +libiwinfo +kmod-dummy + DEPENDS:=+gluon-core +libgluonutil +gluon-client-bridge +gluon-ebtables +firewall +libiwinfo +kmod-dummy +kmod-macvlan endef define Build/Prepare diff --git a/package/gluon-mesh-batman-adv-core/check_site.lua b/package/gluon-mesh-batman-adv-core/check_site.lua index 07bf9a0a..bd0c00a4 100644 --- a/package/gluon-mesh-batman-adv-core/check_site.lua +++ b/package/gluon-mesh-batman-adv-core/check_site.lua @@ -1,25 +1,33 @@ for _, config in ipairs({'wifi24', 'wifi5'}) do - local rates = {1000, 2000, 5500, 6000, 9000, 11000, 12000, 18000, 24000, 36000, 48000, 54000} - rates = need_array_of(config .. '.supported_rates', rates, false) or rates + local rates = {1000, 2000, 5500, 6000, 9000, 11000, 12000, 18000, 24000, 36000, 48000, 54000} + rates = need_array_of(config .. '.supported_rates', rates, false) or rates - if need_table(config .. '.ibss', nil, false) then - need_string(config .. '.ibss.ssid') - need_string_match(config .. '.ibss.bssid', '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$') - need_one_of(config .. '.ibss.mcast_rate', rates, false) - need_number(config .. '.ibss.vlan', false) - need_boolean(config .. '.ibss.disabled', false) - end + if need_table(config .. '.ibss', nil, false) then + need_string(config .. '.ibss.ssid') + need_string_match(config .. '.ibss.bssid', '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$') + need_one_of(config .. '.ibss.mcast_rate', rates, false) + need_number(config .. '.ibss.vlan', false) + need_boolean(config .. '.ibss.disabled', false) + end - if need_table(config .. '.mesh', nil, false) then - need_string(config .. '.mesh.id') - need_one_of(config .. '.mesh.mcast_rate', rates, false) - need_boolean(config .. '.mesh.disabled', false) - end + if need_table(config .. '.mesh', nil, false) then + need_string(config .. '.mesh.id') + need_one_of(config .. '.mesh.mcast_rate', rates, false) + need_boolean(config .. '.mesh.disabled', false) + end end need_boolean('mesh_on_wan', false) need_boolean('mesh_on_lan', false) if need_table('mesh', nil, false) and need_table('mesh.batman_adv', nil, false) then - need_number('mesh.batman_adv.gw_sel_class', false) + need_number('mesh.batman_adv.gw_sel_class', false) end + +need_string_match('next_node.mac', '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$') + +if need_string_match('next_node.ip4', '^%d+.%d+.%d+.%d+$', false) then + need_string_match('prefix4', '^%d+.%d+.%d+.%d+/%d+$') +end + +need_string_match('next_node.ip6', '^[%x:]+$', false) diff --git a/package/gluon-next-node/files/lib/gluon/ebtables/250-next-node b/package/gluon-mesh-batman-adv-core/files/lib/gluon/ebtables/250-next-node similarity index 100% rename from package/gluon-next-node/files/lib/gluon/ebtables/250-next-node rename to package/gluon-mesh-batman-adv-core/files/lib/gluon/ebtables/250-next-node diff --git a/package/gluon-next-node/files/lib/gluon/upgrade/400-next-node b/package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/400-next-node similarity index 100% rename from package/gluon-next-node/files/lib/gluon/upgrade/400-next-node rename to package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/400-next-node diff --git a/package/gluon-next-node/Makefile b/package/gluon-next-node/Makefile deleted file mode 100644 index 87c8edf9..00000000 --- a/package/gluon-next-node/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=gluon-next-node -PKG_VERSION:=3 - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(GLUONDIR)/include/package.mk - - -define Package/gluon-next-node - SECTION:=gluon - CATEGORY:=Gluon - TITLE:=Next-node anycast address - DEPENDS:=+gluon-core +gluon-ebtables +gluon-mesh-batman-adv +kmod-macvlan -endef - -define Package/gluon-next-node/description - Gluon community wifi mesh firmware framework: next-node anycast address -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/gluon-next-node/install - $(CP) ./files/* $(1)/ -endef - -define Package/gluon-next-node/postinst -#!/bin/sh -$(call GluonCheckSite,check_site.lua) -endef - -$(eval $(call BuildPackage,gluon-next-node)) diff --git a/package/gluon-next-node/check_site.lua b/package/gluon-next-node/check_site.lua deleted file mode 100644 index b4d7dd2c..00000000 --- a/package/gluon-next-node/check_site.lua +++ /dev/null @@ -1,7 +0,0 @@ -if need_string_match('next_node.ip4', '^%d+.%d+.%d+.%d+$', false) then - need_string_match('prefix4', '^%d+.%d+.%d+.%d+/%d+$') -end - -need_string_match('next_node.ip6', '^[%x:]+$', false) - -need_string_match('next_node.mac', '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$')