gluon-l3roamd: HACK: unfinished l3roamd package
This commit is contained in:
parent
b9ff2b6f1c
commit
04d2e2381f
31
package/gluon-l3roamd/Makefile
Normal file
31
package/gluon-l3roamd/Makefile
Normal 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))
|
16
package/gluon-l3roamd/files/etc/init.d/gluon-l3roamd
Executable file
16
package/gluon-l3roamd/files/etc/init.d/gluon-l3roamd
Executable 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 -m br-wan -t 11
|
||||
|
||||
procd_close_instance
|
||||
}
|
||||
|
26
package/gluon-l3roamd/files/lib/gluon/upgrade/380-gluon-l3roamd-route
Executable file
26
package/gluon-l3roamd/files/lib/gluon/upgrade/380-gluon-l3roamd-route
Executable 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')
|
||||
|
Loading…
Reference in New Issue
Block a user