summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2009-02-01 14:33:37 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2009-02-01 14:33:37 +0000
commit54dcfe6d8307ba783c184fce483d7a81afdf4ed3 (patch)
treeb6414d6da45e689baded1e2cec76ec004e6e678e /sci-misc
parentMask monopod for removal. (diff)
downloadgentoo-2-54dcfe6d8307ba783c184fce483d7a81afdf4ed3.tar.gz
gentoo-2-54dcfe6d8307ba783c184fce483d7a81afdf4ed3.tar.bz2
gentoo-2-54dcfe6d8307ba783c184fce483d7a81afdf4ed3.zip
Update init script so it works with baselayout1 again. Per bug #257113.
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'sci-misc')
-rw-r--r--sci-misc/boinc/ChangeLog5
-rw-r--r--sci-misc/boinc/files/boinc.init11
2 files changed, 13 insertions, 3 deletions
diff --git a/sci-misc/boinc/ChangeLog b/sci-misc/boinc/ChangeLog
index 1321e2b759cf..e8675279fcd4 100644
--- a/sci-misc/boinc/ChangeLog
+++ b/sci-misc/boinc/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sci-misc/boinc
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/ChangeLog,v 1.47 2009/01/31 15:19:36 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/ChangeLog,v 1.48 2009/02/01 14:33:37 scarabeus Exp $
+
+ 01 Feb 2009; Tomas Chvatal <scarabeus@gentoo.org> files/boinc.init:
+ Update init script so it works with baselayout1 again. Per bug #257113.
*boinc-6.4.5 (31 Jan 2009)
diff --git a/sci-misc/boinc/files/boinc.init b/sci-misc/boinc/files/boinc.init
index 55ebfd4398ff..5013516bb8ed 100644
--- a/sci-misc/boinc/files/boinc.init
+++ b/sci-misc/boinc/files/boinc.init
@@ -64,11 +64,18 @@ start() {
# sys-apps/util-linux
CHRT="/usr/bin/chrt ${SCHED_PARAM}"
+ # check for baselayout version
+ if [[ "`start-stop-daemon --version |awk -F' ' '{print $2}'`" = "(OpenRC)" ]]; then
+ PARAMS="--stdout ${LOGFILE} --stderr ${LOGFILE} -- ${ARGS}"
+ else
+ PARAMS="-- ${ARGS} &> ${LOGFILE}"
+ fi
+
${CHRT} start-stop-daemon \
--quiet --start --chdir ${RUNTIMEDIR} \
--exec ${BOINCBIN} --chuid ${USER}:${GROUP} \
- --background --stdout ${LOGFILE} --stderr ${LOGFILE} \
- --nicelevel ${NICELEVEL} -- ${ARGS}
+ --background --nicelevel ${NICELEVEL} \
+ ${PARAMS}
RESULT=$?