public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrice Clement" <monsieurp@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-misc/boinc/files/
Date: Tue, 26 Apr 2016 07:23:46 +0000 (UTC)	[thread overview]
Message-ID: <1461654478.6fbb2367cc20a9b34acde2f1df699900f310a9cf.monsieurp@gentoo> (raw)

commit:     6fbb2367cc20a9b34acde2f1df699900f310a9cf
Author:     Sven Eden <yamakuzure <AT> gmx <DOT> net>
AuthorDate: Wed Apr 13 12:09:53 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> 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 <monsieurp <AT> 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


             reply	other threads:[~2016-04-26  7:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26  7:23 Patrice Clement [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-11-12 15:39 [gentoo-commits] repo/gentoo:master commit in: sci-misc/boinc/files/ David Seifert
2017-01-04 13:42 David Seifert
2017-01-29 20:10 David Seifert
2021-02-21 21:30 Conrad Kostecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461654478.6fbb2367cc20a9b34acde2f1df699900f310a9cf.monsieurp@gentoo \
    --to=monsieurp@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox