summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-05-23 13:00:28 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2011-05-23 13:00:28 +0000
commitdbc008f431367e3c316c24a4c1c77620d94ef589 (patch)
tree9aa207efbfdda1aac2dd08f67d13a07d97eb4de5 /sci-misc
parentx86 stable per bug 364841 (diff)
downloadhistorical-dbc008f431367e3c316c24a4c1c77620d94ef589.tar.gz
historical-dbc008f431367e3c316c24a4c1c77620d94ef589.tar.bz2
historical-dbc008f431367e3c316c24a4c1c77620d94ef589.zip
Revision bump for total rewrite of the init script.
Package-Manager: portage-2.2.0_alpha34/cvs/Linux x86_64
Diffstat (limited to 'sci-misc')
-rw-r--r--sci-misc/boinc/ChangeLog8
-rw-r--r--sci-misc/boinc/Manifest14
-rw-r--r--sci-misc/boinc/boinc-6.12.26-r1.ebuild (renamed from sci-misc/boinc/boinc-6.12.26.ebuild)2
-rw-r--r--sci-misc/boinc/files/boinc.conf3
-rw-r--r--sci-misc/boinc/files/boinc.init89
5 files changed, 49 insertions, 67 deletions
diff --git a/sci-misc/boinc/ChangeLog b/sci-misc/boinc/ChangeLog
index 83731d81524f..9882251b9ae5 100644
--- a/sci-misc/boinc/ChangeLog
+++ b/sci-misc/boinc/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-misc/boinc
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/ChangeLog,v 1.98 2011/05/22 09:34:20 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/ChangeLog,v 1.99 2011/05/23 13:00:27 scarabeus Exp $
+
+*boinc-6.12.26-r1 (23 May 2011)
+
+ 23 May 2011; Tomáš Chvátal <scarabeus@gentoo.org> -boinc-6.12.26.ebuild,
+ +boinc-6.12.26-r1.ebuild, files/boinc.conf, files/boinc.init:
+ Revision bump for total rewrite of the init script.
22 May 2011; Tomáš Chvátal <scarabeus@gentoo.org> metadata.xml:
Shutup repoman warining about unused local useflags.
diff --git a/sci-misc/boinc/Manifest b/sci-misc/boinc/Manifest
index aa90f6924a5e..381322f944dc 100644
--- a/sci-misc/boinc/Manifest
+++ b/sci-misc/boinc/Manifest
@@ -3,17 +3,17 @@ Hash: SHA1
AUX 6.12.26-fix_subdirs.patch 1042 RMD160 567805fcc0d88a53fb051e7e00d0ef179522b689 SHA1 c11069357e2af66f89eea602233ac8dcf529de71 SHA256 a424a53df0f3154bd4ae305493ef512646e882944349c5e1e98d305f614c685d
AUX 6.12.26-libnotify-0.7.patch 745 RMD160 1e084a3e85cbff42568786119feec11f5f99b926 SHA1 fcba9cbd9df6a69a4e634e0c093b7203e34d6804 SHA256 948337c2489030cfdda1f30b8cffbe4e38b9e8865e70cfcf1747338008b9a56c
-AUX boinc.conf 440 RMD160 eb56e84e0bb56d033fb1b8ff692343eb22fd6877 SHA1 7560db67952b01152f69f3caa5511d267533cc33 SHA256 bf989320e14597fc24d54a24881dafec8a141075a7da71138ca32771d66c6713
-AUX boinc.init 2812 RMD160 c8336d075add218db3e4094483005889ff56f6e4 SHA1 10350333942297bcf2b38ad32d5df1e4c278ca95 SHA256 8c33d3aa3a9aa0a6a999bb26fef0ccf5cab995de77c48e8f1d48c3c1c0e8bfe1
+AUX boinc.conf 376 RMD160 af3ad95f091f00982c5e761e67f885d00a080634 SHA1 dc4054c55858c1b6c8679e88449507c3f59b19a5 SHA256 286f5f11e54a73b41ebf1e35aae1db4c2c3e249a3bfce755ced84c8c1b361cc9
+AUX boinc.init 2610 RMD160 eba633c053c6e992afaa06d10d5e22c23abc9cf3 SHA1 c83b073be66d18bb4eec73fcf5a2a940a0ebbb7e SHA256 5064e491d2bea26115849f7b7d6f0c3e6af9cdb1b75c27b466ce0a1c60a18baa
AUX generate_tarball.sh 3414 RMD160 ac7a0611303e1ed9a84817f94403059bcad097ed SHA1 0b4912213e3cb0bd25f51d57f0f60b7a9bf542e8 SHA256 c0cd0631ffa19ed5937fdda32527e76f7495a2e5b740adb0fbe3c936fab03bb9
DIST boinc-6.12.26.tar.xz 9480644 RMD160 f10aeb0ee9450de7a0d256fdb41def4c67d71c4d SHA1 ce9467578453cf0cd9cd07ab5f2167eeabdb706b SHA256 7efb391ccd37777d89f31b12e3f00343b3a7d250be7d1de960ef4a57f41c49fb
-EBUILD boinc-6.12.26.ebuild 3869 RMD160 4433712972d0bf86951c19dc826dab2ed5741f7e SHA1 2de9e1f6bb457a397a876d18ca500ad0a008de25 SHA256 11c460041dbeb8994bbf8f5b3ef039974fa795e175760f542c05f35cf1e95bf2
-MISC ChangeLog 18087 RMD160 1380655fb185ae5041d440aa578fad5ced90f0dd SHA1 9e0020974bdcc3ab161d067a3e62408beb857d3c SHA256 e6993fc138c91baf26df1d41ca5dece92d37260acde9d856bd10e6e36350f34a
+EBUILD boinc-6.12.26-r1.ebuild 3872 RMD160 c641d287224746cbe7d3a2562e6a8dc630276d1e SHA1 88e93d264a540e7ba3305738b01005f89b73deeb SHA256 b10d0ee53da129b527a0fe5f4c962b58e709df3b0c220bfee1ecfc84612475d4
+MISC ChangeLog 18317 RMD160 2db7737d774976a133c5eb77345ce69a0d20e598 SHA1 3982a81edb70d87d87cbf298d84230a3154728c3 SHA256 c1bc7b1ad6daa39efd1cdfc574baba1aab07471b71e780e214298a9ba8dc0353
MISC metadata.xml 574 RMD160 97ce5bcbca5607c119a2d0484fc228a870594ac7 SHA1 ddf921ef095def89299edfcd0350082de356366a SHA256 76e1da0a34c62e7a78db5b796b64af9da51bf31c159498c147c8d0546be79571
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEARECAAYFAk3Y2KEACgkQHB6c3gNBRYfXtACeNCU7nd8sp0GdS3lCtE7b41R9
-UdMAoJ4ogCgBKV4eWfrwZArcy1EqZ3bh
-=jDn5
+iEYEARECAAYFAk3aWnEACgkQHB6c3gNBRYd87wCfcoTIeIUMiWxp3E9ylbavI/KD
+VwAAoL4Bz0gZZdIhyf2CE9YE/ERpsvln
+=fWDK
-----END PGP SIGNATURE-----
diff --git a/sci-misc/boinc/boinc-6.12.26.ebuild b/sci-misc/boinc/boinc-6.12.26-r1.ebuild
index b1da70fd3037..bd1e2971e600 100644
--- a/sci-misc/boinc/boinc-6.12.26.ebuild
+++ b/sci-misc/boinc/boinc-6.12.26-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/boinc-6.12.26.ebuild,v 1.1 2011/05/22 09:22:59 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/boinc-6.12.26-r1.ebuild,v 1.1 2011/05/23 13:00:27 scarabeus Exp $
EAPI=4
diff --git a/sci-misc/boinc/files/boinc.conf b/sci-misc/boinc/files/boinc.conf
index 827025b7da20..0fef6ae58e37 100644
--- a/sci-misc/boinc/files/boinc.conf
+++ b/sci-misc/boinc/files/boinc.conf
@@ -10,9 +10,6 @@ RUNTIMEDIR="/var/lib/boinc"
# Location of the boinc command line binary
BOINCBIN="/usr/bin/boinc_client"
-# Logfile (/dev/null for nowhere)
-LOGFILE="/var/log/boinc.log"
-
# Allow remote gui RPC yes or no
ALLOW_REMOTE_RPC="no"
diff --git a/sci-misc/boinc/files/boinc.init b/sci-misc/boinc/files/boinc.init
index 37b4fa938f7c..8df428bb1aa5 100644
--- a/sci-misc/boinc/files/boinc.init
+++ b/sci-misc/boinc/files/boinc.init
@@ -1,7 +1,6 @@
#!/sbin/runscript
opts="${opts} attach"
-PIDFILE=/var/run/boinc.pid
depend() {
# we can use dns and net, but we can also in most cases live without them
@@ -12,21 +11,13 @@ 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!"
return 1
fi
- ln -s /etc/ssl/certs/ca-certificates.crt "${RUNTIMEDIR}"/ca-bundle.crt
fi
-}
-
-generate_logs() {
- if [ ! -f "${LOGFILE}" ]; then
- einfo "No ${LOGFILE} around. Creating new..."
- einfo "You really should use app-admin/logrotate for the log rotation."
- touch "${LOGFILE}"
- chown "${USER}:${GROUP}" "${LOGFILE}"
+ if [ ! -e "${RUNTIMEDIR}"/ca-bundle.crt ] ; then
+ ln -s /etc/ssl/certs/ca-certificates.crt "${RUNTIMEDIR}"/ca-bundle.crt
fi
}
@@ -37,16 +28,23 @@ cuda_check() {
fi
}
-start() {
- ebegin "Starting BOINC"
+check_baselayout() {
+ if [ "${RC_VERSION:-0}" = "0" ]; then
+ eerror "This script cannot be used for baselayout-1."
+ return 1
+ fi
+}
+start() {
+ check_baselayout || return 1
create_work_directory || return 1
cuda_check
- cd "${RUNTIMEDIR}"
+ # always ensure proper ownership
+ chown -R "${USER}:${GROUP}" "${RUNTIMEDIR}"
- if [ ! -f lockfile ]; then
- einfo "File $RUNTIMEDIR/lockfile does not exist, assuming first run."
+ if [ ! -f "${RUNTIMEDIR}/lockfile" ]; then
+ einfo "File \"${RUNTIMEDIR}/lockfile\" does not exist, assuming first run."
einfo "You need to setup an account on the BOINC project homepage beforehand!"
einfo "Go to http://boinc.berkeley.edu/ and locate your project."
einfo "Then either run /etc/init.d/boinc attach or connect with a gui client"
@@ -60,65 +58,46 @@ start() {
ARGS="${ARGS} --allow_remote_gui_rpc"
fi
- if [ -n "${RC_UNAME}" ]; then
- PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}"
- else
- PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1"
- fi
-
- generate_logs
-
- start-stop-daemon \
- --start --quiet --chdir "${RUNTIMEDIR}" \
- --make-pidfile \
- --pidfile "${PIDFILE}" \
- --chuid "${USER}:${GROUP}" \
- --nicelevel "${NICELEVEL}" \
- --exec "${BOINCBIN}" ${PARAMS}
-
- RESULT=$?
-
- eend ${RESULT}
+ ebegin "Starting ${SVCNAME}"
+ su -m ${USER} -c "nice -n ${NICELEVEL} \"${BOINCBIN}\" ${ARGS} --daemon --dir \"${RUNTIMEDIR}\" --redirectio"
+ eend $?
}
attach() {
- local password args url key
- local was_started=true
+ local password url key
+
+ einfo "If you cant find your account key just try to obtain it by using:"
+ einfo " boinccmd --passwd PASSWORD_FROM_GUI_RPC_AUTH --lookup_account URL EMAIL PASSWORD"
printf " Enter the Project URL: "
read url
printf " Enter your Account Key: "
read key
- 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"
- boinccmd --host localhost --passwd "${password}" ${args}
+ password=$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg")
+
+ ebegin "${SVCNAME}: Attaching to project"
+ su -m ${USER} -c "boinccmd --passwd "${password}" --project_attach ${url} ${key}"
eend $?
- unset password args url key
+ unset password url key
sleep 10
- tail "${LOGFILE}"
-
- [[ ${was_started} = "false" ]] && "${RC_SERVICE}" stop
+ tail "${RUNTIMEDIR}/stdoutdae.txt"
}
stop() {
- ebegin "Stopping BOINC"
- start-stop-daemon --stop --retry 3 --quiet --exec "${BOINCBIN}"
- rm -f "${PIDFILE}"
+ local password
+
+ password=$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg")
+
+ ebegin "Stopping ${SVCNAME}"
+ su -m ${USER} -c "boinccmd --passwd "${password}" --quit"
eend $?
-}
-restart() {
- stop
- sleep 3
- start
+ unset password
}