diff --git a/boinc-client-init-d b/boinc-client-init-d index 91ecb57..79b5fd6 100644 --- a/boinc-client-init-d +++ b/boinc-client-init-d @@ -152,8 +152,8 @@ fi ## Functions: $1 is one of start|stop|status|reload|restart case "$1" in - start) - cd $BOINCDIR + start) + cd $BOINCDIR if [ ! -d projects ] ; then echo -n "The BOINC client requires initialization (no projects attached)." @@ -162,11 +162,29 @@ case "$1" in fi echo -n "Starting BOINC client as a daemon: " - daemon --check $BOINCEXE --user $BOINCUSER +19 "$BOINCEXE $BOINCOPTS" >>$LOGFILE 2>>$ERRORLOG & - sleep 1 - PID=`pidof -s -x -o $$ -o $PPID -o %PPID $BOINCEXE` - if [ $PID ]; then - touch $LOCKFILE && echo_success || echo_failure + + # Check that we're a privileged user + if [ `id -u` != 0 ] ; then + echo -n "Insufficient rights." + echo_failure + echo + exit 4 + fi + + daemon --check $BOINCEXE --user $BOINCUSER +19 "$BOINCEXE $BOINCOPTS" >>$LOGFILE 2>>$ERRORLOG & + try=0 + while [ $try -lt 10 ] ; do + PID=`pidof -s -x -o $$ -o $PPID -o %PPID $BOINCEXE` + if [ $PID ]; then + touch $LOCKFILE && echo_success || echo_failure + break + else + sleep 1 + fi + let try+=1 + done; + if [ -z $PID ]; then + echo_failure fi echo ;; diff --git a/boinc-client.spec b/boinc-client.spec index 772d1e1..6c1e84c 100644 --- a/boinc-client.spec +++ b/boinc-client.spec @@ -4,7 +4,7 @@ Summary: The BOINC client core Name: boinc-client Version: 5.10.45 -Release: 14.%{snap}svn%{?dist} +Release: 15.%{snap}svn%{?dist} License: LGPLv2+ Group: Applications/Engineering URL: http://boinc.berkeley.edu/ @@ -107,12 +107,21 @@ This package contains development files for %{name}. %build %ifarch i386 -%configure --disable-static --enable-unicode --with-boinc-platform=i686-pc-linux-gnu STRIP=: +%define boinc_platform i686-pc-linux-gnu +%endif +%ifarch powerpc ppc +%define boinc_platform powerpc-linux-gnu +%endif +%ifarch powerpc64 ppc64 +%define boinc_platform ppc64-linux-gnu +%endif + +%if %{defined boinc_platform} +%configure --disable-static --enable-unicode --with-boinc-platform=%{boinc_platform} STRIP=: %else %configure --disable-static --enable-unicode STRIP=: %endif - # Parallel make does not work. make -k @@ -269,6 +278,13 @@ fi %{_includedir}/BOINC/* %changelog +* Mon Aug 04 2008 Milos Jakubicek - 5.10.45-15.20080315svn +- Fixed return value when managing the daemon with insufficient rights to 4 + according to the guidelines. +- There is now a delay up to 10 seconds when starting the service to check + that it is up. +- Fixed boinc platform on PPC/PPC64. + * Sat May 17 2008 Milos Jakubicek - 5.10.45-14.20080315svn - Fixed opening locales by adding boinc-locales.patch