gluon-l3roamd: HACK: unfinished l3roamd package

This commit is contained in:
Nils Schneider 2016-04-08 12:08:44 +02:00 committed by Christof Schulze
parent 7e200c7bc1
commit 80ed000b86
3 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,31 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-l3roamd
PKG_VERSION:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/gluon-l3roamd
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Configure l3roamd for babel
DEPENDS:=+gluon-core +gluon-mesh-babel +l3roamd
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/gluon-l3roamd/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,gluon-l3roamd))

View File

@ -0,0 +1,16 @@
#!/bin/sh /etc/rc.common
START=50
USE_PROCD=1
PROG=/usr/bin/l3roamd
start_service () {
procd_open_instance
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param command "$PROG" -p $(lua -e 'print(require("gluon.site_config").prefix6)') -i br-client -m mesh0 -t 11 -a $(uci get network.loopback.ip6addr | cut -d/ -f1)
procd_close_instance
}

View File

@ -0,0 +1,26 @@
#!/usr/bin/lua
local uci = require('luci.model.uci').cursor()
local site = require 'gluon.site_config'
uci:delete('network', 'l3roam')
uci:section('network', 'interface', 'l3roam',
{
ifname = 'l3roam0',
proto = 'none',
}
)
uci:delete('network', 'l3roamd_client')
uci:section('network', 'route6', 'l3roamd_client',
{
interface = 'l3roam',
target = site.prefix6,
gateway = '::',
table = '10',
}
)
uci:save('network')
uci:commit('network')