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 94DD1138206 for ; Tue, 26 Apr 2016 07:23:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB946E0875; Tue, 26 Apr 2016 07:23:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 81EF5E0875 for ; Tue, 26 Apr 2016 07:23:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7245E3408D4 for ; Tue, 26 Apr 2016 07:23:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 76518188 for ; Tue, 26 Apr 2016 07:23:46 +0000 (UTC) From: "Patrice Clement" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrice Clement" Message-ID: <1461654478.6fbb2367cc20a9b34acde2f1df699900f310a9cf.monsieurp@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-misc/boinc/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-misc/boinc/files/boinc.init X-VCS-Directories: sci-misc/boinc/files/ X-VCS-Committer: monsieurp X-VCS-Committer-Name: Patrice Clement X-VCS-Revision: 6fbb2367cc20a9b34acde2f1df699900f310a9cf X-VCS-Branch: master Date: Tue, 26 Apr 2016 07:23:46 +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: 06150d49-1863-4af5-9a79-e74c4d125280 X-Archives-Hash: f7a2666acab5f985a4cd77f18f7a0ced commit: 6fbb2367cc20a9b34acde2f1df699900f310a9cf Author: Sven Eden gmx net> AuthorDate: Wed Apr 13 12:09:53 2016 +0000 Commit: Patrice Clement gentoo org> CommitDate: Tue Apr 26 07:07:58 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fbb2367 sci-misc/boinc: Migrated boinc.init to use start-stop-daemon The boinc init script can no longer start, attach or stop the boinc manager if openrc-0.20 and newer is used, because openrc no longer passes $SHELL to init scripts. To solve the issue the init script has been migrated to use start-stop-daemon instead of using 'su' directly. This change should have no impact for users of previous openrc versions. Gentoo-Bug: https://bugs.gentoo.org/574260 Package-Manager: portage-2.2.28 Closes: https://github.com/gentoo/gentoo/pull/1244 Signed-off-by: Patrice Clement gentoo.org> sci-misc/boinc/files/boinc.init | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sci-misc/boinc/files/boinc.init b/sci-misc/boinc/files/boinc.init index a350e3e..6ed9041 100644 --- a/sci-misc/boinc/files/boinc.init +++ b/sci-misc/boinc/files/boinc.init @@ -1,4 +1,7 @@ #!/sbin/runscript +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ extra_started_commands="attach" @@ -59,7 +62,7 @@ start() { fi ebegin "Starting ${SVCNAME}" - su -m ${USER} -c "nice -n ${NICELEVEL} \"${BOINCBIN}\" ${ARGS} --daemon --dir \"${RUNTIMEDIR}\" --redirectio" + start-stop-daemon -S -N ${NICELEVEL} -u ${USER} -q -x "${BOINCBIN}" -- ${ARGS} --daemon --dir "${RUNTIMEDIR}" --redirectio eend $? } @@ -81,7 +84,7 @@ attach() { password=$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg") ebegin "${SVCNAME}: Attaching to project" - su -m ${USER} -c "boinccmd --passwd \"${password}\" --project_attach ${url} ${key}" + start-stop-daemon -u ${USER} -q -x boinccmd -- --passwd "${password}" --project_attach ${url} ${key} eend $? unset password url key @@ -96,7 +99,7 @@ stop() { password=$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg") ebegin "Stopping ${SVCNAME}" - su -m ${USER} -c "boinccmd --passwd \"${password}\" --quit" + start-stop-daemon -u ${USER} -q -x boinccmd -- --passwd "${password}" --quit eend $? unset password