Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 309439

Summary: sci-misc/boinc-6.10.36: proivded init script won't start boinc control program
Product: Gentoo Linux Reporter: Erik Ohrnberger <eohrnberger>
Component: Current packagesAssignee: Gentoo Science Related Packages <sci>
Status: RESOLVED FIXED    
Severity: normal CC: xarthisius
Priority: High Keywords: Inclusion, InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to resolve the starting of the boinc daemon control program

Description Erik Ohrnberger 2010-03-15 05:42:37 UTC
The init.d script provided in the package doesn't start the boinc control daemon.  It just fails when trying to start the daemon, providing feedback to the user that all is well, when it's not.

Reproducible: Always

Steps to Reproduce:
1. /etc/init.d/boinc start
Actual Results:  
With the errors in the init.d script, the boinc daemon won't start and won't execute the calculation program, and the error is tracked in a non-obvious (at least to me, so milage may vary) location / log file.

Expected Results:  
Nothing happened.  No execution of the boinc control program, nor it's related calculation programs.

Expected results should be the execution and daemonization of the boinc control program, which in turn starts the actual calculation program.

I've managed to track down the starting of the boinc_client daemon with this patch to the ibnit script:
============
--- boinc       2010-03-14 23:59:56.000000000 -0400
+++ boinc.orig  2010-03-14 23:04:27.000000000 -0400
@@ -57,32 +57,27 @@
        fi
 
        if [ "${ALLOW_REMOTE_RPC}" = "yes" ]; then
-               ARGS="${ARGS} --allow_remote_gui_rpc"
+               ARGS="${ARGS} -allow_remote_gui_rpc"
        fi
 
        if [ -n "${RC_UNAME}" ]; then
-               PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' ${ARGS}"
+               PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}"
        else
-               PARAMS="${ARGS} >> '${LOGFILE}' 2>&1"
+               PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1 &"
        fi
 
        generate_logs
 
-       # sys-apps/util-linux (setup scheduling policy if specified, otherwise blank out
-    if [ "${SCHED_PARAM}" = "" ]; then
-        CHRT=""
-    else
-       CHRT="/usr/bin/chrt ${SCHED_PARAM}"
-    fi
+       # sys-apps/util-linux
+       CHRT="/usr/bin/chrt ${SCHED_PARAM}"
 
        eval ${CHRT} start-stop-daemon \
-               --start --quiet --chdir "${RUNTIMEDIR}" \
-        --background \
-               --make-pidfile \
+               --quiet --start --chdir "${RUNTIMEDIR}" \
                --pidfile "${PIDFILE}" \
-        --chuid "${USER}:${GROUP}" \
+               --make-pidfile \
+               --exec "${BOINCBIN}" --chuid "${USER}:${GROUP}" \
                --nicelevel "${NICELEVEL}" \
-               --exec "${BOINCBIN}" -- ${PARAMS}
+               ${PARAMS}
 
        RESULT=$?
============
Unfortunately, I can't seem to figure out how to make the init script stop the boinc control and calculation programs that are executing.

Some of this would appear to be related to the un-orthagonality of the upstream package.  While you can start the boinc control program using the boinc_client executable (stated to be a debug only program), to stop an executing boinc control program you'll need to use boinccmd --quite.  Y

et boinccmd doesn't seem to have a way to start the boinc control program, you you'll have to use both of them(?).
Comment 1 Erik Ohrnberger 2010-03-15 05:44:10 UTC
Created attachment 223579 [details]
Patch to resolve the starting of the boinc daemon control program
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-03-15 07:15:54 UTC
*** Bug 309441 has been marked as a duplicate of this bug. ***
Comment 3 Tomáš Chvátal (RETIRED) gentoo-dev 2010-07-09 16:49:52 UTC
Fixed in main tree. Thx for the patch.
Comment 4 Chris Brown 2010-09-06 16:58:36 UTC
Not so sure that this is fixed
I have boinc installed on four machines it works on 2 and does not work on the other 2