From 5ff0702165790f32fb42c0224f6cd0e082adcb34 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ra=C3=BAl=20Porcel?= Date: Wed, 21 Mar 2007 18:42:05 +0000 Subject: [PATCH] Make init script POSIX compilant, bug 171691, thanks to Natanael Copa for the patch Package-Manager: portage-2.1.2.2 --- net-p2p/btpd/ChangeLog | 6 +++++- net-p2p/btpd/files/initd_btpd | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/net-p2p/btpd/ChangeLog b/net-p2p/btpd/ChangeLog index 71327688768f..86ef527594ea 100644 --- a/net-p2p/btpd/ChangeLog +++ b/net-p2p/btpd/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-p2p/btpd # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/btpd/ChangeLog,v 1.3 2007/03/05 15:13:52 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/btpd/ChangeLog,v 1.4 2007/03/21 18:42:05 armin76 Exp $ + + 21 Mar 2007; Raúl Porcel files/initd_btpd: + Make init script POSIX compilant, bug 171691, thanks to Natanael Copa + for the patch *btpd-0.12 (05 Mar 2007) diff --git a/net-p2p/btpd/files/initd_btpd b/net-p2p/btpd/files/initd_btpd index 2d54e9bdb758..02505e95252c 100644 --- a/net-p2p/btpd/files/initd_btpd +++ b/net-p2p/btpd/files/initd_btpd @@ -51,7 +51,7 @@ stop() { local retries=0 ebegin "Stopping BitTorrent Protocol Daemon" - while [[ -n "`pgrep -u ${BTPDUSER} btpd`" && ${retries} -lt 4 ]]; do + while [ -n "`pgrep -u ${BTPDUSER} btpd`" ] && [ ${retries} -lt 4 ]; do if test ${retries} -eq 0; then su ${BTPDUSER} -c "btcli kill" else @@ -59,7 +59,7 @@ stop() { fi sleep 1 - let retries=$retries+1 + retries=$(( $retries + 1 )) done if [ ${retries} -lt 4 ]; then -- 2.26.2