1 |
commit: 6fbb2367cc20a9b34acde2f1df699900f310a9cf |
2 |
Author: Sven Eden <yamakuzure <AT> gmx <DOT> net> |
3 |
AuthorDate: Wed Apr 13 12:09:53 2016 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 26 07:07:58 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fbb2367 |
7 |
|
8 |
sci-misc/boinc: Migrated boinc.init to use start-stop-daemon |
9 |
|
10 |
The boinc init script can no longer start, attach or stop the boinc |
11 |
manager if openrc-0.20 and newer is used, because openrc no longer |
12 |
passes $SHELL to init scripts. |
13 |
|
14 |
To solve the issue the init script has been migrated to use |
15 |
start-stop-daemon instead of using 'su' directly. |
16 |
|
17 |
This change should have no impact for users of previous openrc |
18 |
versions. |
19 |
|
20 |
Gentoo-Bug: https://bugs.gentoo.org/574260 |
21 |
Package-Manager: portage-2.2.28 |
22 |
Closes: https://github.com/gentoo/gentoo/pull/1244 |
23 |
|
24 |
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org> |
25 |
|
26 |
sci-misc/boinc/files/boinc.init | 9 ++++++--- |
27 |
1 file changed, 6 insertions(+), 3 deletions(-) |
28 |
|
29 |
diff --git a/sci-misc/boinc/files/boinc.init b/sci-misc/boinc/files/boinc.init |
30 |
index a350e3e..6ed9041 100644 |
31 |
--- a/sci-misc/boinc/files/boinc.init |
32 |
+++ b/sci-misc/boinc/files/boinc.init |
33 |
@@ -1,4 +1,7 @@ |
34 |
#!/sbin/runscript |
35 |
+# Copyright 1999-2016 Gentoo Foundation |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+# $Id$ |
38 |
|
39 |
extra_started_commands="attach" |
40 |
|
41 |
@@ -59,7 +62,7 @@ start() { |
42 |
fi |
43 |
|
44 |
ebegin "Starting ${SVCNAME}" |
45 |
- su -m ${USER} -c "nice -n ${NICELEVEL} \"${BOINCBIN}\" ${ARGS} --daemon --dir \"${RUNTIMEDIR}\" --redirectio" |
46 |
+ start-stop-daemon -S -N ${NICELEVEL} -u ${USER} -q -x "${BOINCBIN}" -- ${ARGS} --daemon --dir "${RUNTIMEDIR}" --redirectio |
47 |
eend $? |
48 |
} |
49 |
|
50 |
@@ -81,7 +84,7 @@ attach() { |
51 |
password=$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg") |
52 |
|
53 |
ebegin "${SVCNAME}: Attaching to project" |
54 |
- su -m ${USER} -c "boinccmd --passwd \"${password}\" --project_attach ${url} ${key}" |
55 |
+ start-stop-daemon -u ${USER} -q -x boinccmd -- --passwd "${password}" --project_attach ${url} ${key} |
56 |
eend $? |
57 |
|
58 |
unset password url key |
59 |
@@ -96,7 +99,7 @@ stop() { |
60 |
password=$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg") |
61 |
|
62 |
ebegin "Stopping ${SVCNAME}" |
63 |
- su -m ${USER} -c "boinccmd --passwd \"${password}\" --quit" |
64 |
+ start-stop-daemon -u ${USER} -q -x boinccmd -- --passwd "${password}" --quit |
65 |
eend $? |
66 |
|
67 |
unset password |