Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 29835 Details for
Bug 40120
setiathome didn't run after merging
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
init.d script for using seti user & group, plus also fix for stopping bug
setiathome (text/plain), 2.33 KB, created by
Julie Brandon
on 2004-04-22 12:13:22 UTC
(
hide
)
Description:
init.d script for using seti user & group, plus also fix for stopping bug
Filename:
MIME Type:
Creator:
Julie Brandon
Created:
2004-04-22 12:13:22 UTC
Size:
2.33 KB
patch
obsolete
>#!/sbin/runscript > >if [ -z "${SETIATHOME_THREADS}" ]; then > SETIATHOME_THREADS=$( egrep -c "^bogomips" /proc/cpuinfo ) >fi > >depend() { > need net >} > >checkconfig() { > SETIBINDIR="/opt/setiathome" > if [ ! -e "${SETIATHOME_DIR}" ] ; then > einfo "Creating ${SETIATHOME_DIR}" > mkdir "${SETIATHOME_DIR}" > chown seti.seti "${SETIATHOME_DIR}" > fi > > if [ ! -e "${SETIATHOME_DIR}/user_info.sah" ] ; then > eerror "Please setup SETI@home first by running the following commands:" > eerror cd "${SETIATHOME_DIR}" > eerror su seti -c ${SETIBINDIR}/setiathome -login ${SETIATHOME_OPTIONS} > return 1 > fi > > if [ "${SETIATHOME_THREADS}" != '1' ] ; then > cd ${SETIATHOME_DIR} > for thread in `seq 2 "${SETIATHOME_THREADS}"`; do > if [ ! -e "${SETIATHOME_DIR}/thread${thread}" ]; then > mkdir "${SETIATHOME_DIR}/thread${thread}" > cp "${SETIATHOME_DIR}/user_info.sah" "${SETIATHOME_DIR}/thread${thread}" > chown seti.seti "${SETIATHOME_DIR}/thread${thread}" "${SETIATHOME_DIR}/thread${thread}/user_info.sah" > fi > done > fi > return 0 >} > >start() { > checkconfig || return 1; > > if [ "${SETIATHOME_THREADS}" = '1' ] ; then > ebegin "Starting SETI@home" > else > ebegin "Starting SETI@home (${SETIATHOME_THREADS} threads)" > fi > > for thread in `seq 1 "${SETIATHOME_THREADS}"`; do > cd "${SETIATHOME_DIR}" > if [ "${thread}" != '1' ]; then > cd "thread${thread}" > fi > > ${SETIATHOME_DIR}/setiwrapper ${SETIBINDIR} ${SETIATHOME_OPTIONS} >& setiathome.log & > done > > eend $? >} > >stop() { > ebegin "Stopping SETI@home" > # By default, killing the setiwrapper shell processes does not > # reliably appear to immediately abort the running child commands, as > # such we need to kill off the shell AND its child command > # processes as neatly as we can > > # Grab the PIDs of the setiwrapper shell scripts > WRAPPERPPIDS=`/sbin/pidof -x setiwrapper` > # For each setiwrapper script .. > for WRAPPERPPID in ${WRAPPERPPIDS}; do > # Stop the shell script running (so it can't potentially > # spawn new children) > kill -STOP ${WRAPPERPPID} > # Terminate all the children created by the script > kill -TERM `ps --no-headers -opid --ppid ${WRAPPERPPID}` > # Ask the wrapper script to neatly hang-up > kill -HUP ${WRAPPERPPID} > # Restart the stopped script so that it gets its HUP signal, > # and can terminate cleanly, leaving no zombies > # (running, dead, or alive) > kill -CONT ${WRAPPERPPID} > done > eend $? >}
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 40120
:
26049
|
29823
|
29824
|
29835
|
29836
|
30443
|
30445