packages/ptrtd: use new service functions
authorNicolas Thill <nico@openwrt.org>
Wed, 9 Nov 2011 23:49:21 +0000 (23:49 +0000)
committerNicolas Thill <nico@openwrt.org>
Wed, 9 Nov 2011 23:49:21 +0000 (23:49 +0000)
SVN-Revision: 28926

ipv6/ptrtd/Makefile
ipv6/ptrtd/files/ptrtd.init

index d77120700f7429d0811c94f8a657ba8cdae25e88..4e1aa6503c57113d84f3945780467eaebb0d879d 100644 (file)
@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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/
index 8f4ae24d324c3e2db560343afb052ca66eed8b7e..6d7cf68b690571fb9e5cc6e5fb81b305f850c492 100644 (file)
@@ -1,26 +1,15 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 
 START=60
-BIN=ptrtd
-RUN_D=/var/run
-PID_F=$RUN_D/$BIN.pid
 
 PREFIX="3ffe:abcd:1234:9876::"
 LEN=64
 
-
 start() {
-       mkdir -p $RUN_D
-       $BIN -p $PREFIX -l $LEN
+       service_start /usr/sbin/ptrtd -p $PREFIX -l $LEN
 }
 
 stop() {
-       [ -f $PID_F ] && kill $(cat $PID_F)
-}
-
-restart() {
-       stop
-       sleep 1
-       start
+       service_stop /usr/sbin/ptrtd
 }