Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 493476 - sci-misc/boinc's init script could use suspend/resume improvement
Summary: sci-misc/boinc's init script could use suspend/resume improvement
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Eden
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-06 20:56 UTC by Toralf Förster
Modified: 2016-11-14 08:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
init.d patch (boinc.init.patch,695 bytes, patch)
2013-12-07 19:13 UTC, Toralf Förster
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2013-12-06 20:56:41 UTC
These 2 things in the init script would be a nice to have:

$ for url in $(boinccmd --get_project_status | sed -n 's/\s*master URL: //p'); do boinccmd --project ${url} suspend; done

$ for url in $(boinccmd --get_project_status | sed -n 's/\s*master URL: //p'); do boinccmd --project ${url} resume; done
Comment 1 Toralf Förster gentoo-dev 2013-12-07 19:13:30 UTC
Created attachment 364844 [details, diff]
init.d patch

q&d works here
Comment 2 Toralf Förster gentoo-dev 2014-11-19 19:09:13 UTC
hhm, this is much better, b/c boinc automatically reads the password from the file /gui_rpc_auth.cfg then :

suspend()       {
        cd $RUNTIMEDIR
        for url in $(boinccmd --get_project_status | sed -n 's/\s*master URL: //p'); do boinccmd --project ${url} suspend; done
}

resume()        {
        cd $RUNTIMEDIR
        for url in $(boinccmd --get_project_status | sed -n 's/\s*master URL: //p'); do boinccmd --project ${url} resume; done
}


IMO this could also simplify the other parts of the init.c script -and- BTW would avoid, that the password can be seen in the process list !
Comment 3 Sven Eden 2016-05-06 06:30:02 UTC
The init script got reviewed and updated. Only boinc-7.2.* needs the password on the command line, versions 7.4.* and 7.6.* no longer need it.

As for the suspend/resume feature, you want to have the ability for the user to be able to suspend all projects if not running the GUI, right?
Comment 4 Toralf Förster gentoo-dev 2016-05-06 08:08:58 UTC
IIRC, the use case was to hold on BOINC while running emerge, so - yes, w/o GUI.
Comment 5 Sven Eden 2016-11-07 08:44:59 UTC
Sorry for the long delay. I know it is very very overdue, but at least I have finally managed to put the new functions into a commit for a pull request.

https://github.com/gentoo/gentoo/pull/2768/commits/5866ce9875cfde0e7ff7f2ef0dd5a0bb83bcd85e
Comment 6 Sven Eden 2016-11-14 08:17:50 UTC
The latest init script should be able to suspend and resume all projects without the need for a gui.

Thank you very much for your suggestion! And sorry again for the long delay.