diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2009-04-23 16:13:33 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2009-04-23 16:13:33 +0000 |
commit | 62c780abe45a54f704a8502d3c4d2d4a2aade41c (patch) | |
tree | c04446f15bca977bf0768e127d842170a108ef30 /sci-misc | |
parent | Bump to 1.3.102. Fixes #258249 (diff) | |
download | gentoo-2-62c780abe45a54f704a8502d3c4d2d4a2aade41c.tar.gz gentoo-2-62c780abe45a54f704a8502d3c4d2d4a2aade41c.tar.bz2 gentoo-2-62c780abe45a54f704a8502d3c4d2d4a2aade41c.zip |
Some gentoo syntax improvement in init.d file.
(Portage version: 2.2_rc30/cvs/Linux x86_64)
Diffstat (limited to 'sci-misc')
-rw-r--r-- | sci-misc/boinc/ChangeLog | 5 | ||||
-rw-r--r-- | sci-misc/boinc/files/boinc.init | 37 |
2 files changed, 23 insertions, 19 deletions
diff --git a/sci-misc/boinc/ChangeLog b/sci-misc/boinc/ChangeLog index 2c545e729c85..9afee9df4eb8 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.59 2009/04/23 16:00:16 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/ChangeLog,v 1.60 2009/04/23 16:13:33 scarabeus Exp $ + + 23 Apr 2009; Tomas Chvatal <scarabeus@gentoo.org> files/boinc.init: + Some gentoo syntax improvement in init.d file. 23 Apr 2009; Tomas Chvatal <scarabeus@gentoo.org> files/boinc.init, boinc-6.4.5-r1.ebuild: diff --git a/sci-misc/boinc/files/boinc.init b/sci-misc/boinc/files/boinc.init index 3735c4bd12f1..6e31db676682 100644 --- a/sci-misc/boinc/files/boinc.init +++ b/sci-misc/boinc/files/boinc.init @@ -8,31 +8,31 @@ depend() { } 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 } 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 } 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 } @@ -42,7 +42,7 @@ start() { create_work_directory cuda_check - cd $RUNTIMEDIR + pushd ${RUNTIMEDIR} > /dev/null if [[ ! -f lockfile ]]; then einfo "File $RUNTIMEDIR/lockfile does not exist, assuming first run." @@ -88,7 +88,7 @@ start() { fi fi - eend $RESULT + eend ${RESULT} } attach() { @@ -103,18 +103,19 @@ attach() { 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 $? sleep 10 - tail $LOGFILE + tail ${LOGFILE} } stop() { ebegin "Stopping BOINC" - start-stop-daemon --stop --retry 3 --quiet --exec $BOINCBIN + start-stop-daemon --stop --retry 3 --quiet --exec ${BOINCBIN} eend $? } |