From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Lx1YT-00034a-Ia for garchives@archives.gentoo.org; Thu, 23 Apr 2009 16:13:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 00963E064A; Thu, 23 Apr 2009 16:13:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B3240E064A for ; Thu, 23 Apr 2009 16:13:34 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 5B9B86504C for ; Thu, 23 Apr 2009 16:13:34 +0000 (UTC) Received: from scarabeus by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1Lx1YL-0007kM-Uc for gentoo-commits@lists.gentoo.org; Thu, 23 Apr 2009 16:13:33 +0000 From: "Tomas Chvatal (scarabeus)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, scarabeus@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in sci-misc/boinc/files: boinc.init X-VCS-Repository: gentoo-x86 X-VCS-Files: boinc.init X-VCS-Directories: sci-misc/boinc/files X-VCS-Committer: scarabeus X-VCS-Committer-Name: Tomas Chvatal Content-Type: text/plain; charset=utf8 Message-Id: Sender: Tomas Chvatal Date: Thu, 23 Apr 2009 16:13:33 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 0113048d-3017-4385-8d45-436408ed1c90 X-Archives-Hash: 30093725c69013a453405e1f2713ecfc scarabeus 09/04/23 16:13:33 Modified: boinc.init Log: Some gentoo syntax improvement in init.d file. (Portage version: 2.2_rc30/cvs/Linux x86_64) Revision Changes Path 1.13 sci-misc/boinc/files/boinc.init file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-misc/boinc/fil= es/boinc.init?rev=3D1.13&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-misc/boinc/fil= es/boinc.init?rev=3D1.13&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-misc/boinc/fil= es/boinc.init?r1=3D1.12&r2=3D1.13 Index: boinc.init =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/sci-misc/boinc/files/boinc.init,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- boinc.init 23 Apr 2009 16:00:17 -0000 1.12 +++ boinc.init 23 Apr 2009 16:13:33 -0000 1.13 @@ -8,31 +8,31 @@ } =20 create_work_directory() { - if [[ ! -d $RUNTIMEDIR ]]; then - einfo "Directory $RUNTIMEDIR not existing, creating now." - mkdir $RUNTIMEDIR - chown ${USER}:${GROUP} $RUNTIMEDIR - if [[ ! -d $RUNTIMEDIR ]]; then - eeror "Directory $RUNTIMEDIR could not be created!" + if [[ ! -d ${RUNTIMEDIR} ]]; then + einfo "Directory ${RUNTIMEDIR} not existing, creating now." + mkdir ${RUNTIMEDIR} + chown ${USER}:${GROUP} ${RUNTIMEDIR} + if [[ ! -d ${RUNTIMEDIR} ]]; then + eeror "Directory ${RUNTIMEDIR} could not be created!" return 1 fi - ln -s /etc/ssl/certs/ca-certificates.crt $RUNTIMEDIR/ca-bundle.crt + ln -s /etc/ssl/certs/ca-certificates.crt ${RUNTIMEDIR}/ca-bundle.crt fi } =20 generate_logs() { - if [[ ! -f $LOGFILE ]]; then - einfo "No $LOGFILE around. Creating new..." + if [[ ! -f ${LOGFILE} ]]; then + einfo "No ${LOGFILE} around. Creating new..." einfo "For good log rotation is great tool app-admin/logrotate" - touch $LOGFILE - chown ${USER}:${GROUP} $LOGFILE + touch ${LOGFILE} + chown ${USER}:${GROUP} ${LOGFILE} fi } =20 cuda_check() { if [[ -f /opt/cuda/%LIBDIR%/libcudart.so ]]; then # symlink wont harm :] - ln -snf /opt/cuda/%LIBDIR%/libcudart.so $RUNTIMEDIR/libcudart.so + ln -snf /opt/cuda/%LIBDIR%/libcudart.so ${RUNTIMEDIR}/libcudart.so fi } =20 @@ -42,7 +42,7 @@ create_work_directory cuda_check =20 - cd $RUNTIMEDIR + pushd ${RUNTIMEDIR} > /dev/null =20 if [[ ! -f lockfile ]]; then einfo "File $RUNTIMEDIR/lockfile does not exist, assuming first run." @@ -88,7 +88,7 @@ fi =20 fi =20 =20 - eend $RESULT + eend ${RESULT} } =20 attach() { @@ -103,18 +103,19 @@ fi ebegin "Attaching to project" # we have to work in runtime directory - cd $RUNTIMEDIR + pushd ${RUNTIMEDIR} > /dev/null # boinc does not return 1 when it fails currently - $BOINCBIN --chuid ${USER}:${GROUP} --attach_project $url $key &> /dev/= null + ${BOINCBIN} --chuid ${USER}:${GROUP} --attach_project ${url} ${key} &>= /dev/null + popd > /dev/null eend $? =20 sleep 10 - tail $LOGFILE + tail ${LOGFILE} } =20 stop() { ebegin "Stopping BOINC" - start-stop-daemon --stop --retry 3 --quiet --exec $BOINCBIN + start-stop-daemon --stop --retry 3 --quiet --exec ${BOINCBIN} eend $? } =20