Skip to content
Snippets Groups Projects
Commit 994ddc82 authored by Helge Jung's avatar Helge Jung
Browse files

batman-on-wan: reworked to use Lua in firmware

parent 886f1cb8
No related branches found
No related tags found
No related merge requests found
include $(TOPDIR)/rules.mk
PKG_NAME:=ffpb-batman-on-wan
PKG_VERSION:=1
PKG_NAME := gluon-batman-on-wan
PKG_VERSION := 2
PKG_RELEASE:=$(GLUON_VERSION).$(GLUON_SITE_CODE)-$(GLUON_RELEASE).$(GLUON_CONFIG_VERSION)
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
......@@ -12,7 +12,7 @@ define Package/gluon-batman-on-wan
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Option to enable mesh (batadv) on WAN port
DEPENDS:=+gluon-core +gluon-mesh-batman-adv
DEPENDS:=+gluon-core +gluon-mesh-batman-adv +luci-lib-core
endef
define Package/gluon-batman-on-wan/description
......@@ -36,7 +36,7 @@ define Build/Compile
endef
define Package/gluon-batman-on-wan/install
$(GLUON_GENERATE) ./generate/* $(1)/
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/lib/gluon
endef
......
#!/usr/bin/lua
local site = require 'gluon.site_config'
local sysconfig = require 'gluon.sysconfig'
local uci = require 'luci.model.uci'
local c = uci.cursor()
c:section('network', 'interface', 'mesh_wan',
{
ifname = 'br-wan',
proto = 'batadv',
mesh = 'bat0',
auto = site.batman_on_wan,
}
)
c:save('network')
c:commit('network')
#!/bin/sh
. /lib/functions.sh
uci_add network interface mesh_wan
uci_set network mesh_wan ifname 'br-wan'
uci_set network mesh_wan proto 'batadv'
uci_set network mesh_wan mesh 'bat0'
uci_set network mesh_wan auto @batman_on_wan@
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