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

This commit is contained in:
Matthias Schiffer 2014-08-08 15:50:52 +02:00
parent 2d49f57704
commit 29c0d89e4c
16 changed files with 90 additions and 70 deletions

View File

@ -0,0 +1,32 @@
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))

View File

@ -0,0 +1,37 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-mesh-batman-adv-core
PKG_VERSION:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(GLUONDIR)/include/package.mk
define Package/gluon-mesh-batman-adv-core
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Support for batman-adv meshing (core)
DEPENDS:=+gluon-core +firewall +kmod-ipt-nathelper
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/gluon-mesh-batman-adv-core/install
$(CP) ./files/* $(1)/
endef
define Package/gluon-mesh-batman-adv-core/postinst
#!/bin/sh
$(call GluonCheckSite,check_site.lua)
endef
$(eval $(call BuildPackage,gluon-mesh-batman-adv-core))

View File

@ -0,0 +1 @@
return util.trim(fs.readfile('/sys/module/batman_adv/version'))

View File

@ -16,6 +16,25 @@ uci:save('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', 'peerdns', 1)

View File

@ -1,41 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-mesh-batman-adv
PKG_VERSION:=3
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(GLUONDIR)/include/package.mk
define Package/gluon-mesh-batman-adv
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Support for batman-adv meshing
DEPENDS:=+gluon-core +kmod-batman-adv-legacy +firewall +kmod-ipt-nathelper
endef
define Package/gluon-mesh-batman-adv/description
Gluon community wifi mesh firmware framework: batman-adv support
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/gluon-mesh-batman-adv/install
$(CP) ./files/* $(1)/
endef
define Package/gluon-mesh-batman-adv/postinst
#!/bin/sh
$(call GluonCheckSite,check_site.lua)
endef
$(eval $(call BuildPackage,gluon-mesh-batman-adv))

View File

@ -1,3 +0,0 @@
local version = util.trim(fs.readfile('/sys/module/batman_adv/version'))
return { version = version }

View File

@ -1,26 +0,0 @@
#!/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')