Skip to content
Snippets Groups Projects
Commit 279cfd51 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

Split gluon-mesh-batman-adv into gluon-mesh-batman-adv-core and gluon-mesh-batman-adv-14

parent cd0a932a
No related branches found
No related tags found
No related merge requests found
Showing
with 90 additions and 29 deletions
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-mesh-batman-adv-14
PKG_VERSION:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(GLUONDIR)/include/package.mk
define Package/gluon-mesh-batman-adv-14
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Support for batman-adv meshing (compat level 14)
DEPENDS:=+gluon-mesh-batman-adv-core +kmod-batman-adv-legacy
PROVIDES:=gluon-mesh-batman-adv
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/gluon-mesh-batman-adv-14/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,gluon-mesh-batman-adv-14))
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-mesh-batman-adv PKG_NAME:=gluon-mesh-batman-adv-core
PKG_VERSION:=3 PKG_VERSION:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(GLUONDIR)/include/package.mk include $(GLUONDIR)/include/package.mk
define Package/gluon-mesh-batman-adv define Package/gluon-mesh-batman-adv-core
SECTION:=gluon SECTION:=gluon
CATEGORY:=Gluon CATEGORY:=Gluon
TITLE:=Support for batman-adv meshing TITLE:=Support for batman-adv meshing (core)
DEPENDS:=+gluon-core +kmod-batman-adv-legacy +firewall +kmod-ipt-nathelper DEPENDS:=+gluon-core +firewall +kmod-ipt-nathelper
endef
define Package/gluon-mesh-batman-adv/description
Gluon community wifi mesh firmware framework: batman-adv support
endef endef
define Build/Prepare define Build/Prepare
...@@ -28,14 +24,14 @@ endef ...@@ -28,14 +24,14 @@ endef
define Build/Compile define Build/Compile
endef endef
define Package/gluon-mesh-batman-adv/install define Package/gluon-mesh-batman-adv-core/install
$(CP) ./files/* $(1)/ $(CP) ./files/* $(1)/
endef endef
define Package/gluon-mesh-batman-adv/postinst define Package/gluon-mesh-batman-adv-core/postinst
#!/bin/sh #!/bin/sh
$(call GluonCheckSite,check_site.lua) $(call GluonCheckSite,check_site.lua)
endef endef
$(eval $(call BuildPackage,gluon-mesh-batman-adv)) $(eval $(call BuildPackage,gluon-mesh-batman-adv-core))
return util.trim(fs.readfile('/sys/module/batman_adv/version'))
...@@ -16,6 +16,25 @@ uci:save('batman-adv') ...@@ -16,6 +16,25 @@ uci:save('batman-adv')
uci:commit('batman-adv') uci:commit('batman-adv')
if not uci:get('network', 'client') then
local ifname
if sysconfig.lan_ifname then
ifname = sysconfig.lan_ifname .. ' bat0'
else
ifname = 'bat0'
end
uci:section('network', 'interface', 'client',
{
ifname = ifname,
type = 'bridge',
proto = 'dhcpv6',
reqprefix = 'no',
}
)
end
uci:set('network', 'client', 'macaddr', sysconfig.primary_mac) uci:set('network', 'client', 'macaddr', sysconfig.primary_mac)
uci:set('network', 'client', 'peerdns', 1) uci:set('network', 'client', 'peerdns', 1)
......
local version = util.trim(fs.readfile('/sys/module/batman_adv/version'))
return { version = version }
#!/usr/bin/lua
local sysconfig = require 'gluon.sysconfig'
local uci = require('luci.model.uci').cursor()
local ifname
if sysconfig.lan_ifname then
ifname = sysconfig.lan_ifname .. ' bat0'
else
ifname = 'bat0'
end
uci:section('network', 'interface', 'client',
{
ifname = ifname,
type = 'bridge',
proto = 'dhcpv6',
reqprefix = 'no',
}
)
uci:save('network')
uci:commit('network')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment