Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 218571 Details for
Bug 303631
sci-biology/foldingathome - add ioniceness to init.d
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Revised init.d script
foldingathome (text/plain), 1.57 KB, created by
Daniel Santos
on 2010-02-05 20:35:48 UTC
(
hide
)
Description:
Revised init.d script
Filename:
MIME Type:
Creator:
Daniel Santos
Created:
2010-02-05 20:35:48 UTC
Size:
1.57 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2004 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/files/init-5.0.2-r5,v 1.1 2006/06/16 08:44:04 phosphan Exp $ > >opts="${opts} unitinfo" > >do_config() { > if [ -z "${CPU}" ] || [ "${CPU}" == "0" ]; then > if [ -r /proc/cpuinfo ]; then > CPU=`grep "^processor[[:space:]]*:" /proc/cpuinfo | wc -l` > if (( $CPU > 8 )); then > CPU=8 > fi > else > CPU=1 > fi > fi >} > >unitinfo() { > do_config > for (($CPU; CPU > 0; CPU--)); do > einfo "CPU ${CPU} $(head -n1 /opt/foldingathome/client${CPU}/unitinfo.txt):" > sed -e '1,2d' /opt/foldingathome/client${CPU}/unitinfo.txt > done >} > >start() { > do_config > su foldingathome -c /opt/foldingathome/copy_client_config > IONICE_CMD=`which ionice 2>/dev/null && echo -c 3` > for (($CPU; CPU > 0; CPU--)); do > ebegin "Starting Folding@Home on CPU ${CPU}" > cd /opt/foldingathome/client${CPU}/ > ${IONICE_CMD} start-stop-daemon --chdir ${PWD} --chuid foldingathome --nicelevel 19 --start --background --exec ./foldingathome -- ${FOLD_OPTS} > eend $? > done >} > >stop() { > do_config > for (($CPU; CPU > 0; CPU--)); do > ebegin "Stopping Folding@Home on CPU ${CPU}" > start-stop-daemon --stop --user foldingathome --exec /opt/foldingathome/client${CPU}/foldingathome > cd /opt/foldingathome/client${CPU}/ > for I in FahCore*.exe; do > if ps ax|grep $I > /dev/null 2>&1; then > killall -q $I > /dev/null 2>&1 > fi > done > sleep 1 > if ps ax|grep '[/]opt[/]foldingathome/client${CPU}/' > /dev/null 2>&1; then > eend 1 > else > eend 0 > fi > done >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 303631
: 218571