Signed-off-by: Christopher Smith <christopher.smith-openwrt aO sphere-systems.com>
---
Index: ipv6/ptrtd/files/ptrtd.init
===================================================================
--- ipv6/ptrtd/files/ptrtd.init (revision 12614)
+++ ipv6/ptrtd/files/ptrtd.init (working copy)
@@ -6,13 +6,13 @@
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
-PREFIX="3ffe:abcd:1234:9876::"
-LEN=64
-
-
start() {
+ config_load ptrtd
+ config_get PREFIX global prefix
+ config_get PREFIX_LEN global prefixlen
+
mkdir -p $RUN_D
- $BIN -p $PREFIX -l $LEN
+ $BIN -p $PREFIX -l $PREFIX_LEN
}
stop() {
Index: ipv6/ptrtd/files/ptrtd.config
===================================================================
--- ipv6/ptrtd/files/ptrtd.config (revision 0)
+++ ipv6/ptrtd/files/ptrtd.config (revision 0)
@@ -0,0 +1,3 @@
+config ptrtd global
+ option prefix "3ffe:abcd:1234:9876::"
+ option prefixlen 96
Index: ipv6/ptrtd/Makefile
===================================================================
--- ipv6/ptrtd/Makefile (revision 12614)
+++ ipv6/ptrtd/Makefile (working copy)
@@ -10,7 +10,7 @@
PKG_NAME:=ptrtd
PKG_VERSION:=0.5.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://v6web.litech.org/ptrtd/dist/
@@ -36,7 +36,13 @@
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)"
+define Package/ptrtd/conffiles
+/etc/config/ptrtd
+endef
+
define Package/ptrtd/install
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DATA) ./files/ptrtd.config $(1)/etc/config/ptrtd
$(INSTALL_DIR) $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d/
--
Christopher Smith, CCDP, LPIC-1, MCP
President, Sphere Systems, Inc.
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
