From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1B7D713856C for ; Sat, 19 Jan 2013 13:51:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 87C4321C067; Sat, 19 Jan 2013 13:51:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0A6FB21C067 for ; Sat, 19 Jan 2013 13:51:27 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DEE9433D8B0 for ; Sat, 19 Jan 2013 13:51:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 7B64AE4073 for ; Sat, 19 Jan 2013 13:51:25 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1358603471.e90ed138ecef0d255d46673cecbfb773cd23196c.blueness@gentoo> Subject: [gentoo-commits] dev/blueness:master commit in: net-proxy/obfsproxy/files/ X-VCS-Repository: dev/blueness X-VCS-Files: net-proxy/obfsproxy/files/obfsproxy.confd net-proxy/obfsproxy/files/obfsproxy.initd X-VCS-Directories: net-proxy/obfsproxy/files/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: e90ed138ecef0d255d46673cecbfb773cd23196c X-VCS-Branch: master Date: Sat, 19 Jan 2013 13:51:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 08e2c5e9-1971-49bd-ad26-19851bbed178 X-Archives-Hash: 6ec49e4688ac1d5bb104e20f2b52d268 commit: e90ed138ecef0d255d46673cecbfb773cd23196c Author: Anthony G. Basile gentoo org> AuthorDate: Sat Jan 19 13:51:11 2013 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sat Jan 19 13:51:11 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/blueness.git;a=commit;h=e90ed138 net-proxy/obfsproxy: fix CMDLINE for initd --- net-proxy/obfsproxy/files/obfsproxy.confd | 2 +- net-proxy/obfsproxy/files/obfsproxy.initd | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/net-proxy/obfsproxy/files/obfsproxy.confd b/net-proxy/obfsproxy/files/obfsproxy.confd index 30e8fa9..0f3699d 100644 --- a/net-proxy/obfsproxy/files/obfsproxy.confd +++ b/net-proxy/obfsproxy/files/obfsproxy.confd @@ -31,7 +31,7 @@ PROTOCOL="obfs2" # Example: # obfsproxy obfs2 --dest=127.0.0.1:666 --shared-secret=himitsu server 127.0.0.1:1026 -MODE="socks" +MODE="server" DESTINATION="127.0.0.1:666" SECRET="changeme" LISTEN="127.0.0.1:1026" diff --git a/net-proxy/obfsproxy/files/obfsproxy.initd b/net-proxy/obfsproxy/files/obfsproxy.initd index 2e67745..887a7c8 100644 --- a/net-proxy/obfsproxy/files/obfsproxy.initd +++ b/net-proxy/obfsproxy/files/obfsproxy.initd @@ -13,23 +13,25 @@ depend() { start() { [ "x${MODE}" = "x" ] && eerror "MODE not given" if [ ${PROTOCOL} = "dummy" ] ; then - [ "x${MODE}" = "xserver" && "x${TARGET}" = "x" ] && eerror "MODE=server but no target was given" - [ "x${MODE}" = "xsocks" && "x${TARGET}" != "x" ] && eerror "MODE=sock but a target was given" - CMDLINE="${MODE} ${LISTEN} ${TARGET} ${LOGGING}" + [[ "x${MODE}" = "xserver" && "x${TARGET}" = "x" ]] && eerror "MODE=server but no target was given" + [[ "x${MODE}" = "xsocks" && "x${TARGET}" != "x" ]] && eerror "MODE=sock but a target was given" + CMDLINE="${LOGGING} ${PROTOCOL} ${MODE} ${LISTEN} ${TARGET}" elif [ ${PROTOCOL} = "obfs2" ] ; then - [ "x${LISTEN}" = "x" ] && eerror "LISTEN host:port is not given" - [ "x${DESTINATION}" != "x" ] && DESTINATION="--dest=${DESTINATION}" - [ "x${SECRET}" != "x" ] && SECRET="--shared-secret=${SECRET}" - CMDLINE="${DESTINATION} ${SECRET} ${MODE} ${LISTEN} ${LOGGING}" + [[ "x${MODE}" = "xsocks" && "x${DESTINATION}" != "x" ]] && eerror "MODE=sock but a destination was given" + [[ "x${LISTEN}" = "x" ]] && eerror "LISTEN host:port is not given" + [[ "x${DESTINATION}" != "x" ]] && DESTINATION="--dest=${DESTINATION}" + [[ "x${SECRET}" != "x" ]] && SECRET="--shared-secret=${SECRET}" + CMDLINE="${LOGGING} ${PROTOCOL} ${DESTINATION} ${SECRET} ${MODE} ${LISTEN}" else eerror "Unknown protocol ${PROTOCOL}" fi - start-stop-daemon --start --pidfile "${PIDFILE}" --exec "${DAEMON}" + ewarn ${CMDLINE} + start-stop-daemon -b --start --exec ${DAEMON} -- ${CMDLINE} eend $? } stop() { - start-stop-daemon --stop --pidfile "${PIDFILE}" + start-stop-daemon --stop --exec ${DAEMON} }