From 3e6d09ce9e276edefd035ef3f79e2e66367149ed Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 5 Feb 2012 15:05:59 +0000 Subject: [PATCH] [packages_10.03.2] btpd: merge r29055 SVN-Revision: 30198 --- net/btpd/Makefile | 2 +- net/btpd/files/btpd.init | 26 ++++++++++---------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/net/btpd/Makefile b/net/btpd/Makefile index 14830d65be..b98e1480c0 100644 --- a/net/btpd/Makefile +++ b/net/btpd/Makefile @@ -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 diff --git a/net/btpd/files/btpd.init b/net/btpd/files/btpd.init index 8f266c62bb..867b5538d9 100644 --- a/net/btpd/files/btpd.init +++ b/net/btpd/files/btpd.init @@ -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 } -- 2.30.2