Some work on the next-node anycast address
This commit is contained in:
parent
05fb012ae4
commit
8a51242f3e
36
package/gluon-next-node/Makefile
Normal file
36
package/gluon-next-node/Makefile
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=gluon-next-node
|
||||||
|
PKG_VERSION:=0.3.2.99
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/gluon-next-node
|
||||||
|
SECTION:=gluon
|
||||||
|
CATEGORY:=Gluon
|
||||||
|
TITLE:=Next-node anycast address
|
||||||
|
DEPENDS:=+gluon-core +gluon-mesh-batman-adv +iproute2 +kmod-macvlan
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/gluon-next-node/description
|
||||||
|
Gluon community wifi mesh firmware framework: next-node anycast address
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
mkdir -p $(PKG_BUILD_DIR)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/gluon-next-node/install
|
||||||
|
$(GLUON_GENERATE) ./generate/* $(1)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,gluon-next-node))
|
25
package/gluon-next-node/generate/etc/init.d/gluon-next-node
Normal file
25
package/gluon-next-node/generate/etc/init.d/gluon-next-node
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2013 Project Gluon
|
||||||
|
|
||||||
|
START=95
|
||||||
|
|
||||||
|
|
||||||
|
start() {
|
||||||
|
ip link add link br-mesh name local-node type macvlan
|
||||||
|
ip link set local-node address @next_node.mac@
|
||||||
|
|
||||||
|
ip address add @next_node.ip4@/32 dev local-node
|
||||||
|
ip route add @next_node.prefix4@ dev br-freifunk
|
||||||
|
|
||||||
|
ip address add @next_node.ip6@/128 dev local-node
|
||||||
|
ip route add @next_node.prefix6@ dev br-freifunk
|
||||||
|
|
||||||
|
ip link set local-node up
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ip route del @next_node.prefix4@ dev br-freifunk
|
||||||
|
ip route del @next_node.prefix6@ dev br-freifunk
|
||||||
|
ip link set local-node down
|
||||||
|
ip link del local-node
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user