summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2012-11-29 20:14:18 +0000
committerSteven Barth <cyrus@openwrt.org>2012-11-29 20:14:18 +0000
commit25d943e872e0300302f6a381881a215684be0d0e (patch)
treea262719fd008cdb83fd532afe231876d3d04486f /package
parent7d3495b4319f6361b9c77f483f3a092084c3e942 (diff)
downloadmtk-20170518-25d943e872e0300302f6a381881a215684be0d0e.zip
mtk-20170518-25d943e872e0300302f6a381881a215684be0d0e.tar.gz
mtk-20170518-25d943e872e0300302f6a381881a215684be0d0e.tar.bz2
6distributed: add local IPv6 prefix distributor
SVN-Revision: 34420
Diffstat (limited to 'package')
-rw-r--r--package/network/ipv6/6distributed/Makefile46
-rwxr-xr-xpackage/network/ipv6/6distributed/files/6distributed.init18
2 files changed, 64 insertions, 0 deletions
diff --git a/package/network/ipv6/6distributed/Makefile b/package/network/ipv6/6distributed/Makefile
new file mode 100644
index 0000000..af185ee
--- /dev/null
+++ b/package/network/ipv6/6distributed/Makefile
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=6distributed
+PKG_VERSION:=2012-11-28
+PKG_RELEASE=$(PKG_SOURCE_VERSION)
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=git://github.com/sbyx/6distributed.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=c86e46337cbf21caa6fa7e856deb7b28d94d146b
+
+PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/6distributed
+ SECTION:=ipv6
+ CATEGORY:=IPv6
+ TITLE:=IPv6 host prefix distribution daemon
+ DEPENDS:=+kmod-ipv6 +libubus +libubox
+endef
+
+define Package/6distributed/description
+ 6distributed is a daemon that distributes IPv6 prefixes locally across
+ downstream interfaces. It supports valid and preferred lifetimes and
+ delayed allocation so that an already acquired prefix can be distributed
+ on interfaces that come up later.
+endef
+
+define Package/6distributed/install
+ $(INSTALL_DIR) $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/6distributed $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/6distributed.init $(1)/etc/init.d/6distributed
+endef
+
+$(eval $(call BuildPackage,6distributed))
diff --git a/package/network/ipv6/6distributed/files/6distributed.init b/package/network/ipv6/6distributed/files/6distributed.init
new file mode 100755
index 0000000..c2dfd1c
--- /dev/null
+++ b/package/network/ipv6/6distributed/files/6distributed.init
@@ -0,0 +1,18 @@
+#!/bin/sh /etc/rc.common
+
+START=15
+
+SERVICE_DAEMONIZE=1
+SERVICE_WRITE_PID=1
+SERVICE_PID_FILE=/var/run/6distributed.pid
+DISTRIBUTED_BIN=/usr/sbin/6distributed
+
+start()
+{
+ service_start $DISTRIBUTED_BIN
+}
+
+stop()
+{
+ service_stop $DISTRIBUTED_BIN
+}