2011-04-28 19:29:54 +02:00
|
|
|
Index: client/scripts/boinc-client.in
|
|
|
|
===================================================================
|
|
|
|
--- client/scripts/boinc-client.in.orig
|
|
|
|
+++ client/scripts/boinc-client.in
|
|
|
|
@@ -19,13 +19,13 @@
|
|
|
|
# For more information about BOINC (the Berkeley Open Infrastructure
|
|
|
|
# for Network Computing) see http://boinc.berkeley.edu
|
|
|
|
# processname: boinc
|
|
|
|
-# config: /etc/sysconfig/boinc
|
|
|
|
+# config: /etc/sysconfig/boinc-client
|
|
|
|
#
|
|
|
|
### BEGIN INIT INFO
|
|
|
|
# Provides: boinc
|
|
|
|
-# Required-Start: $network
|
|
|
|
-# Required-Stop: $network
|
|
|
|
-# Default-Start: 3 4 5
|
|
|
|
+# Required-Start: $network $remote_fs
|
|
|
|
+# Required-Stop: $network $remote_fs
|
|
|
|
+# Default-Start: 3 5
|
|
|
|
# Default-Stop: 0 1 2 6
|
|
|
|
# Short-Description: This script monitors the BOINC client.
|
|
|
|
# Description: This script starts the local BOINC client as a daemon
|
|
|
|
@@ -117,6 +117,10 @@ fi
|
|
|
|
#
|
|
|
|
BOINCUSER=boinc
|
|
|
|
|
|
|
|
+# Name of group to run as:
|
|
|
|
+#
|
2011-08-30 20:19:26 +02:00
|
|
|
+BOINCUSER=boinc
|
2011-04-28 19:29:54 +02:00
|
|
|
+
|
|
|
|
# Working directory. Could be /home/boinc, /var/lib/boinc, etc..
|
|
|
|
# The reason I prefer /var/lib/boinc is that this works best for a
|
|
|
|
# cluster of computers where /home/anything might be shared between machines
|
|
|
|
@@ -128,7 +132,7 @@ BOINCDIR=/var/lib/boinc
|
|
|
|
# but I like to rename it and put it in a public place.
|
|
|
|
# (Hint: move boincmgr to /usr/local/bin too so anyone can easily use it).
|
|
|
|
#
|
|
|
|
-BOINCEXE_NAME=boinc_client
|
|
|
|
+BOINCEXE_NAME=boinc-client
|
|
|
|
BOINCEXE=${bindir}/${BOINCEXE_NAME}
|
|
|
|
BOINCCMD_NAME=boinccmd
|
|
|
|
BOINCCMD=${bindir}/${BOINCCMD_NAME}
|
2011-08-30 20:19:26 +02:00
|
|
|
@@ -161,9 +165,7 @@ BOINCOPTS=
|
|
|
|
# Subsys lock file ...
|
|
|
|
|
|
|
|
# If there is the subsys directory, then use it ...
|
|
|
|
-if [ -d /var/lock/subsys/ ]; then
|
|
|
|
- LOCKFILE=/var/lock/subsys/${BOINCEXE_NAME}
|
|
|
|
-elif [ -d /var/lock ]; then
|
|
|
|
+if [ -d /var/lock ]; then
|
|
|
|
LOCKFILE=/var/lock/${BOINCEXE_NAME}
|
|
|
|
elif [ -d /var/run ]; then
|
|
|
|
LOCKFILE=/var/run/${BOINCEXE_NAME}.lock
|
|
|
|
@@ -178,8 +180,8 @@ export TERM=dumb
|
2011-04-28 19:29:54 +02:00
|
|
|
# but if the functions are not found we create our own simple replacements.
|
|
|
|
# (The idea for replacing the functions comes from OpenAFS. Thanks guys!)
|
|
|
|
|
|
|
|
-if [ -f /etc/rc.d/init.d/functions ] ; then
|
|
|
|
- . /etc/rc.d/init.d/functions
|
|
|
|
+if [ -f /etc/init.d/functions ] ; then
|
|
|
|
+ . /etc/init.d/functions
|
|
|
|
else
|
|
|
|
if printf "Hello" >/dev/null 2>/dev/null ; then
|
|
|
|
# printf works
|
2011-08-30 20:19:26 +02:00
|
|
|
@@ -279,7 +281,7 @@ if [ ! -d $BOINCDIR ]; then
|
2011-04-28 19:29:54 +02:00
|
|
|
echo -n "Creating $BOINCDIR "
|
|
|
|
if mkdir -p $BOINCDIR 2>/dev/null ; then
|
|
|
|
if [ -n "$BOINCUSER" ] ; then
|
|
|
|
- if chown $BOINCUSER $BOINCDIR ; then
|
2011-08-30 20:19:26 +02:00
|
|
|
+ if chown $BOINCUSER $BOINCGROUP $BOINCDIR ; then
|
2011-04-28 19:29:54 +02:00
|
|
|
echo_success
|
|
|
|
else
|
|
|
|
echo_failure
|
2011-08-30 20:19:26 +02:00
|
|
|
@@ -329,8 +331,8 @@ if [ "${USERNOW}" = "${BOINCUSER}" ] ; t
|
2011-04-28 19:29:54 +02:00
|
|
|
exit 8
|
|
|
|
fi
|
|
|
|
elif [ "${USERNOW}" = "root" ] ; then
|
|
|
|
- cmd="if test -O ${BOINCDIR} ; then echo success ; fi"
|
|
|
|
- if [ -z `su $BOINCUSER -c "$cmd"` ]; then
|
2011-08-30 20:19:26 +02:00
|
|
|
+ # cmd="if test -O ${BOINCDIR} ; then echo success ; fi"
|
|
|
|
+ # if [ -z `su $BOINCUSER -c "$cmd"` ]; then
|
2011-04-28 19:29:54 +02:00
|
|
|
echo -n ERROR: $BOINCDIR is not owned by $BOINCUSER.
|
|
|
|
echo_failure
|
|
|
|
echo
|