public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Tomas Chvatal (scarabeus)" <scarabeus@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in sci-misc/boinc/files: boinc.init
Date: Sun, 22 Nov 2009 13:38:27 +0000	[thread overview]
Message-ID: <E1NCCe3-0006a4-8V@stork.gentoo.org> (raw)

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/files/boinc.init?rev=1.19&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-misc/boinc/files/boinc.init?rev=1.19&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-misc/boinc/files/boinc.init?r1=1.18&r2=1.19

Index: boinc.init
===================================================================
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
 
-	generate_logs
-
 	if [ "${ALLOW_REMOTE_RPC}" = "yes" ]; then
 		ARGS="${ARGS} -allow_remote_gui_rpc"
 	fi
 
-	# sys-apps/util-linux
-	CHRT="/usr/bin/chrt ${SCHED_PARAM}"
-
-	# check for baselayout version
 	if [ -n "${RC_UNAME}" ]; then
 		PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}"
 	else
 		PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1 &"
 	fi
 
+	generate_logs
+
+	# sys-apps/util-linux
+	CHRT="/usr/bin/chrt ${SCHED_PARAM}"
+
 	eval ${CHRT} start-stop-daemon \
 		--quiet --start --chdir "${RUNTIMEDIR}" \
 		--pidfile "${PIDFILE}" \
@@ -95,26 +94,32 @@
 }
 
 attach() {
+	local password args url key
+	local was_started=true
+
 	printf "    Enter the Project URL: "
 	read url
 	printf "    Enter your Account Key: "
 	read key
 
-	RC_QUIET_STDOUT="yes" status
-	if [ $? = 1 ]; then
-		start
+	password=$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg")
+	args="--project_attach ${url} ${key}"
+
+	if ! service_started; then
+		was_started=false
+		"${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 $?
 
+	unset password args url key
+
 	sleep 10
 	tail "${LOGFILE}"
+
+	[[ ${was_started} = "false" ]] && "${RC_SERVICE}" stop
 }
 
 stop() {






             reply	other threads:[~2009-11-22 13:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-22 13:38 Tomas Chvatal (scarabeus) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-10-23 18:55 [gentoo-commits] gentoo-x86 commit in sci-misc/boinc/files: boinc.init Lars Wendler (polynomial-c)
2011-09-08 15:56 Tomas Chvatal (scarabeus)
2011-05-23 19:47 Tomas Chvatal (scarabeus)
2011-05-22  9:26 Tomas Chvatal (scarabeus)
2010-07-19 20:34 Tomas Chvatal (scarabeus)
2010-07-15 21:28 Tomas Chvatal (scarabeus)
2010-07-09 16:49 Tomas Chvatal (scarabeus)
2009-11-10 21:42 Tomas Chvatal (scarabeus)
2009-09-02 21:22 Tomas Chvatal (scarabeus)
2009-07-24 10:58 Tomas Chvatal (scarabeus)
2009-07-08  9:00 Tomas Chvatal (scarabeus)
2009-05-29 16:42 Tomas Chvatal (scarabeus)
2009-04-23 16:13 Tomas Chvatal (scarabeus)
2009-04-23 16:00 Tomas Chvatal (scarabeus)
2009-03-11 20:48 Tomas Chvatal (scarabeus)
2009-02-03 14:58 Tomas Chvatal (scarabeus)
2009-02-01 23:06 Tomas Chvatal (scarabeus)
2009-02-01 14:33 Tomas Chvatal (scarabeus)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1NCCe3-0006a4-8V@stork.gentoo.org \
    --to=scarabeus@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox