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 1NCCe4-0004AM-RA for garchives@archives.gentoo.org; Sun, 22 Nov 2009 13:38:29 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 54D73E07DA; Sun, 22 Nov 2009 13:38:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 25743E07D4 for ; Sun, 22 Nov 2009 13:38:28 +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 C1A28B400B for ; Sun, 22 Nov 2009 13:38:27 +0000 (UTC) Received: from scarabeus by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1NCCe3-0006a4-8V for gentoo-commits@lists.gentoo.org; Sun, 22 Nov 2009 13:38:27 +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: Sun, 22 Nov 2009 13:38:27 +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: 3d1fd11f-7ba3-49ae-a50a-978ee54a0aac X-Archives-Hash: cf6ac04b54208ae1c05c777fa8e733a2 scarabeus 09/11/22 13:38:27 Modified: boinc.init Log: Update script attach function to work correcty. (Portage version: 2.2_rc51/cvs/Linux x86_64) Revision Changes Path 1.19 sci-misc/boinc/files/boinc.init file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-misc/boinc/fil= es/boinc.init?rev=3D1.19&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-misc/boinc/fil= es/boinc.init?rev=3D1.19&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-misc/boinc/fil= es/boinc.init?r1=3D1.18&r2=3D1.19 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.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- boinc.init 10 Nov 2009 21:42:49 -0000 1.18 +++ boinc.init 22 Nov 2009 13:38:27 -0000 1.19 @@ -56,22 +56,21 @@ ewarn "network is needed only for jobs fetching afterwards" fi =20 - generate_logs - if [ "${ALLOW_REMOTE_RPC}" =3D "yes" ]; then ARGS=3D"${ARGS} -allow_remote_gui_rpc" fi =20 - # sys-apps/util-linux - CHRT=3D"/usr/bin/chrt ${SCHED_PARAM}" - - # check for baselayout version if [ -n "${RC_UNAME}" ]; then PARAMS=3D"--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- = ${ARGS}" else PARAMS=3D"-- ${ARGS} >> '${LOGFILE}' 2>&1 &" fi =20 + generate_logs + + # sys-apps/util-linux + CHRT=3D"/usr/bin/chrt ${SCHED_PARAM}" + eval ${CHRT} start-stop-daemon \ --quiet --start --chdir "${RUNTIMEDIR}" \ --pidfile "${PIDFILE}" \ @@ -95,26 +94,32 @@ } =20 attach() { + local password args url key + local was_started=3Dtrue + printf " Enter the Project URL: " read url printf " Enter your Account Key: " read key =20 - RC_QUIET_STDOUT=3D"yes" status - if [ $? =3D 1 ]; then - start + password=3D$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg") + args=3D"--project_attach ${url} ${key}" + + if ! service_started; then + was_started=3Dfalse + "${RC_SERVICE}" start fi + ebegin "Attaching to project" - # we have to work in runtime directory - cd "${RUNTIMEDIR}" - # boinc does not return 1 when it fails currently - "${BOINCBIN}" --attach_project "${url}" "${key}" &> /dev/null - # change the perms for the files to defined user/group - chown -R ${USER}:${GROUP} * + boinccmd --host localhost --passwd ${password} ${args} eend $? =20 + unset password args url key + sleep 10 tail "${LOGFILE}" + + [[ ${was_started} =3D "false" ]] && "${RC_SERVICE}" stop } =20 stop() {