I get this message when trying to start boinc: $ sudo /etc/init.d/boinc start * Starting boinc ... This account is currently not available. [ !! ] * ERROR: boinc failed to start I believe this is caused by the lack of $SHELL when running the script, making su use the login shell (/sbin/nologin). Passing -s /bin/sh to su should fix this problem.
Hello Same here. * Starting boinc ... This account is currently not available. [ !! ] * ERROR: boinc failed to start
Sven, can you please have a look whether this is fixed with your latest ebuild?
For me, the init script now starts correctly (with the "-s /bin/sh " addition), but it doesn't stop; it instead gives the same error of "The account is currently not available". Adding the same fix to the su in the stop() function fixest that problem, but this fix needs to also be applied to the "su ..." line in attach() function? I'll attach a patch for the additional changes required.
Created attachment 429240 [details, diff] boinc-init.patch Patch of additional changes needed to boinc init file.
I still need to try to reproduce this. Currently it is like this on my system, and always was: -------- ~ $ sudo /etc/init.d/boinc start Passwort: * Starting boinc ... [ ok ] -------- But I am on it.
This may be related to openrc version. I think this is only happening for openrc-0.20, which no longer pass $SHELL to init scripts.
(In reply to Yutao Yuan from comment #6) > This may be related to openrc version. I think this is only happening for > openrc-0.20, which no longer pass $SHELL to init scripts. Thank you for the hint, I am on stable openrc. I'll upgrade openrc and see whether I can replicate the problem.
Sorry for the long delay! I have eventually reproduced the problem and Russels suggestions fix it. I have created a pull request: https://github.com/gentoo/gentoo/pull/1244
(In reply to Sven Eden from comment #8) > Sorry for the long delay! > > I have eventually reproduced the problem and Russels suggestions fix it. > > I have created a pull request: https://github.com/gentoo/gentoo/pull/1244 I have taken a stept back from the "su -s /bin/sh" fix and instead migrated the init script to use start-stop-daemon instead. My pull request has been updated accordingly.
William when you get round to it, could you please sign off on the PR please? Thanks!
commit 6fbb2367cc20a9b34acde2f1df699900f310a9cf (HEAD -> master) Author: Sven Eden <yamakuzure@gmx.net> AuthorDate: Wed Apr 13 14:09:53 2016 +0200 Commit: Patrice Clement <monsieurp@gentoo.org> CommitDate: Tue Apr 26 07:07:58 2016 +0000 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@gentoo.org> sci-misc/boinc/files/boinc.init | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) William, since you want to keep track of the changes, I'm leaving this bug open. Feel free to close it.
For the current clean-up of the boinc ebuilds, I have further enhanced the script. Besides some suggestions by Jan Chren, the password handling is now safer. From boinc 7.4.x on the boinccmd command no longer needs the password to be submitted via command line. It is automatically read from the config file. The fix is included in this pull request: https://github.com/gentoo/gentoo/pull/1374
The fixed init script is merged into the portage tree.
(In reply to Sven Eden from comment #12) > For the current clean-up of the boinc ebuilds, I have further enhanced the > script. > > Besides some suggestions by Jan Chren, the password handling is now safer. > From boinc 7.4.x on the boinccmd command no longer needs the password to be > submitted via command line. It is automatically read from the config file. Starting boinc is now indeed much better - thanks Sven. Unfortunately, the same can't be said of stopping it: # /etc/init.d/boinc stop * Caching service dependencies [ ok ] * Stopping boinc ... * start-stop-daemon: boinccmd [ !! ] * ERROR: boinc failed to stop # Boinc does end up stopped, but before I can start it again I have to zap it. Please re-open the bug. Sorry to be a nuisance :-)
Never mind. I've opened bug 584386.