forked from pool/boinc-client
- fixed Bug bnc#714623 (/var/lock/subsys unsupported)
OBS-URL: https://build.opensuse.org/package/show/network/boinc-client?expand=0&rev=13
This commit is contained in:
parent
3bfd6bc657
commit
35fe1d11bb
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 30 18:18:14 UTC 2011 - Sascha.Manns@open-slx.de
|
||||
|
||||
- fixed Bug bnc#714623 (/var/lock/subsys unsupported)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 16 18:49:58 CEST 2011 - pth@suse.de
|
||||
|
||||
|
@ -328,7 +328,7 @@ useradd -r -g boinc -d %{_localstatedir}/lib/boinc -s /sbin/nologin \
|
||||
exit 0
|
||||
|
||||
%post
|
||||
%{fillup_and_insserv boinc-client}
|
||||
%fillup_and_insserv boinc-client
|
||||
|
||||
%preun
|
||||
%stop_on_removal boinc-client
|
||||
|
@ -26,7 +26,7 @@ Index: client/scripts/boinc-client.in
|
||||
|
||||
+# Name of group to run as:
|
||||
+#
|
||||
+BOINCGROUP=boinc
|
||||
+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
|
||||
@ -40,7 +40,18 @@ Index: client/scripts/boinc-client.in
|
||||
BOINCEXE=${bindir}/${BOINCEXE_NAME}
|
||||
BOINCCMD_NAME=boinccmd
|
||||
BOINCCMD=${bindir}/${BOINCCMD_NAME}
|
||||
@@ -178,8 +182,8 @@ export TERM=dumb
|
||||
@@ -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
|
||||
# but if the functions are not found we create our own simple replacements.
|
||||
# (The idea for replacing the functions comes from OpenAFS. Thanks guys!)
|
||||
|
||||
@ -51,25 +62,23 @@ Index: client/scripts/boinc-client.in
|
||||
else
|
||||
if printf "Hello" >/dev/null 2>/dev/null ; then
|
||||
# printf works
|
||||
@@ -279,7 +283,7 @@ if [ ! -d $BOINCDIR ]; then
|
||||
@@ -279,7 +281,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
|
||||
+ if chown $BOINCUSER $BOINCGROUP $BOINCDIR ; then
|
||||
echo_success
|
||||
else
|
||||
echo_failure
|
||||
@@ -329,8 +333,10 @@ if [ "${USERNOW}" = "${BOINCUSER}" ] ; t
|
||||
@@ -329,8 +331,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
|
||||
+ if [ -z `sudo -u $BOINCUSER /bin/sh -c "if test -O ${BOINCDIR} ;
|
||||
+ then echo success ; fi"` ]; 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
|
||||
|
@ -22,8 +22,8 @@ PIDFILE=/var/run/${BOINCEXE_NAME}.pid
|
||||
# it will probably be one of the following:
|
||||
#LOCKFILE=/var/lock/${BOINCEXE_NAME}
|
||||
#LOCKFILE=/var/run/${BOINCEXE_NAME}.lock
|
||||
LOCKFILE=/var/lock/subsys/${BOINCEXE_NAME}
|
||||
|
||||
#LOCKFILE=/var/lock/subsys/${BOINCEXE_NAME}
|
||||
LOCKFILE=/var/lib/tmpfiles.d
|
||||
|
||||
# BOINC options: for the command line when running the client.
|
||||
# Be aware that --allow_remote_gui_rpc opens up your machine to the world!
|
||||
|
Loading…
Reference in New Issue
Block a user