btpd: merge r29055
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Feb 2012 15:05:59 +0000 (15:05 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Feb 2012 15:05:59 +0000 (15:05 +0000)
SVN-Revision: 30198

net/btpd/Makefile
net/btpd/files/btpd.init

index 14830d65bebd49918b12210bd98aa160fb871506..b98e1480c01949bbffce892f9bfb0b9300df8c98 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=btpd
 PKG_VERSION:=0.16
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/downloads/btpd/btpd
index 8f266c62bbfc9af04a2ff26363fc2e6afb46ab8c..867b5538d929d9f2548f08b5412f4abd78e3140d 100644 (file)
@@ -1,5 +1,6 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
+
 START=99
 
 append_bool() {
@@ -21,10 +22,11 @@ append_parm() {
        append args "$switch $_loctmp"
 }
 
-directory=""
 
 btpd() {
        local cfg="$1"
+       args=""
+       directory=""
        append_bool "$cfg" useipv4 "-4"
        append_bool "$cfg" useipv6 "-6"
        append_bool "$cfg" emptystart "--empty-start"
@@ -38,30 +40,22 @@ btpd() {
 }
 
 start() {
-       include /lib/network
        config_load btpd
-       args=""
        config_foreach btpd btpd
-       /usr/bin/btpd $args
+
+       service_start /usr/bin/btpd $args
 }
 
 stop() {
-       include /lib/network
        config_load btpd
-       args=""
        config_foreach btpd btpd
-       
+
        [ -d $directory ] && args="-d $directory "
-       echo -n "stop btpd "
-       
+
        while btcli $args kill ; do
-               echo -n .
                sleep 3
        done 2>/dev/null
-       
-       killall /usr/bin/btpd > /dev/null 2>&1
-       
-       echo " done"
-       return 0
+
+       service_stop /usr/bin/btpd
 }