File boinc-init.patch of Package boinc-client

Index: client/scripts/boinc-client.in
===================================================================
--- client/scripts/boinc-client.in.orig
+++ client/scripts/boinc-client.in
@@ -19,14 +19,16 @@
 #         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 
-# Default-Stop: 0 1 2 6
+# Provides:          boinc-client
+# Required-Start:    $network $remote_fs
+# Should-Start:      $time
+# Required-Stop:     $network $remote_fs
+# Should-Stop:       $time
+# 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
 #         For more information about BOINC (the Berkeley Open Infrastructure
@@ -117,6 +119,10 @@ fi
 #
 BOINCUSER=boinc
 
+# Name of group to run as:
+#
+BOINCUSER=boinc
+
 # 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 +134,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}
@@ -161,9 +167,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 +182,8 @@ export TERM=dumb
 # 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
@@ -279,7 +283,7 @@ if [ ! -d $BOINCDIR ]; then
   echo -n "Creating $BOINCDIR "
   if mkdir -p $BOINCDIR 2>/dev/null ; then
     if [ -n "$BOINCUSER" ] ; then
-      if chown $BOINCUSER $BOINCDIR ; then
+      if chown $BOINCUSER $BOINCGROUP $BOINCDIR ; then
         echo_success
       else
         echo_failure
@@ -329,8 +333,8 @@ if [ "${USERNOW}" = "${BOINCUSER}" ] ; t
     exit 8
   fi
 elif [ "${USERNOW}" = "root" ] ; then
-  cmd="if test -O ${BOINCDIR} ; then echo success ; fi"
-  if [ -z `su $BOINCUSER -c "$cmd"` ]; then
+ # cmd="if test -O ${BOINCDIR} ; then echo success ; fi"
+ # if [ -z `su $BOINCUSER -c "$cmd"` ]; then
     echo -n ERROR: $BOINCDIR is not owned by $BOINCUSER.
     echo_failure
     echo
openSUSE Build Service is sponsored by