summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2009-07-24 10:58:33 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2009-07-24 10:58:33 +0000
commitce562e66df416a4e85c73ee37a3efda951771bb0 (patch)
treeb8c2650feed6a43ca45597c1590bba3c232820c2 /sci-misc
parentFix LICENSE to public-domain wrt #278634. (diff)
downloadhistorical-ce562e66df416a4e85c73ee37a3efda951771bb0.tar.gz
historical-ce562e66df416a4e85c73ee37a3efda951771bb0.tar.bz2
historical-ce562e66df416a4e85c73ee37a3efda951771bb0.zip
Remove bashism in initscript. Per bug #278811. Thanks to Michał Górny for the patch.
Package-Manager: portage-2.2_rc33/cvs/Linux x86_64
Diffstat (limited to 'sci-misc')
-rw-r--r--sci-misc/boinc/ChangeLog6
-rw-r--r--sci-misc/boinc/Manifest14
-rw-r--r--sci-misc/boinc/files/boinc.init65
3 files changed, 39 insertions, 46 deletions
diff --git a/sci-misc/boinc/ChangeLog b/sci-misc/boinc/ChangeLog
index 412100467e41..14f3c0cd38e6 100644
--- a/sci-misc/boinc/ChangeLog
+++ b/sci-misc/boinc/ChangeLog
@@ -1,6 +1,10 @@
# 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.66 2009/07/08 09:00:31 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/ChangeLog,v 1.67 2009/07/24 10:58:33 scarabeus Exp $
+
+ 24 Jul 2009; Tomáš Chvátal <scarabeus@gentoo.org> files/boinc.init:
+ Remove bashism in initscript. Per bug #278811. Thanks to Michał Górny
+ for the patch.
08 Jul 2009; Tomáš Chvátal <scarabeus@gentoo.org> files/boinc.init:
Use pidfile in initscript. Per bug #276271.
diff --git a/sci-misc/boinc/Manifest b/sci-misc/boinc/Manifest
index 9ca67fa450e8..3fbb093e31cd 100644
--- a/sci-misc/boinc/Manifest
+++ b/sci-misc/boinc/Manifest
@@ -1,19 +1,9 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX 6.4.5-RSA_security.patch 2413 RMD160 8bf2d0573fedbdbc54f0c479747a23f0ff840f22 SHA1 e5fcafdd0da06a8a59350ff85cf3725e9ff8cede SHA256 f21a6904459ffcfd40cc0804d4a7f46e5a9ef013c217f204e100a8adf8cd4f87
AUX 6.4.5-gcc44.patch 1831 RMD160 82aaff8e51077c712b318a473a77a69ec1e1b615 SHA1 bdd2f4baa48d7949d37150e926dcd0a0625caaf8 SHA256 63d9005aab4e60522f32484694c42f70d291b492c76a839aff348be052845fc4
AUX 6.4.5-nostrip.patch 1052 RMD160 9a23c9cd8f3a47fe53fe8cccfca6d0b94587f716 SHA1 bae0a9de0c0980fd1f64e8b60a74548554dbe382 SHA256 f301d68819c4d93b930d4179ff2bb604d23ca7e221d843c6ed6cf65f27a53da2
AUX boinc.conf 711 RMD160 b6bb25b9d10cbefd3de5d653e701e056e2de4587 SHA1 570929cb4ed50d4fc4408624c4d0d330e208609c SHA256 032f07145ee230f069ffdc93befe90c047fba4314aedfc8024bdb44c06798e9e
-AUX boinc.init 3162 RMD160 4e68afaf242eb134dc87d62832df1c7d73623794 SHA1 07e63710156b7210fb14ba7c330793515cf24a28 SHA256 816f3157c5561cdf3482e4d8c60600043b631ee6c1452c416c337adcf5383628
+AUX boinc.init 3167 RMD160 13383850fc040ed8dfd7d9e71fa36b62fd080c89 SHA1 14f1a9386ebd8d95626c60bbdae8935f8d49e535 SHA256 ac3b25f51f300270661ab5fbd12f9859e23ea18481010ab1f1d76a3f12d9dc21
DIST boinc-6.4.5.tar.bz2 7639286 RMD160 8f7232a3e7d273076f6b2ae50b565550c03485cc SHA1 24c63d11c8e9ebda17beac359928407ce3b8678d SHA256 f6f1d053f10873ed9b3b6ce8dc4444a49f6c804196a3eb080f574db36e58557a
EBUILD boinc-6.4.5-r2.ebuild 4266 RMD160 cf602867d9b53436dd72c7ed6d11810b7b703266 SHA1 4e7e46c1530a8405de1f795bf37d0e6c92f8e08e SHA256 360773ad414711b116e84a9aad4a840f154112f0d861448a9e51039e7b214623
-MISC ChangeLog 12604 RMD160 8ca13580d16fa8d6cb908fd169abea9c0f1b2187 SHA1 c38599abc88e50ff7707a4a7680dcabc3a35a3c2 SHA256 7aa6502fdb092da07ebf9a7dea4e8e28b8e6e210c1d370245b3e7ea07b7dd813
+MISC ChangeLog 12769 RMD160 6aed816f0c7959ef85f621264b16c49a47935b56 SHA1 62862de651c2710c504177a8c974cfc0c016ca57 SHA256 dba7369e5ba57755f02ed7c4895636ad4e9f97ca9556d8d0ba01a644c8885774
MISC metadata.xml 697 RMD160 8cfc36bbae9395d2675629d68af1c6354244bd5f SHA1 bcfd28d367a81a6fa8b6a548703270cb066a9392 SHA256 614f44eeb4b76fccb040b9ab7dee69e50152c930a9224946010f39e7eed6e04c
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.11 (GNU/Linux)
-
-iEYEARECAAYFAkpUYDIACgkQHB6c3gNBRYehzACfR0TcEz9EyHeit7QTiIaq99bu
-unoAoKrrwjlei3m7E92Nn16xxGSeY/IB
-=+TBa
------END PGP SIGNATURE-----
diff --git a/sci-misc/boinc/files/boinc.init b/sci-misc/boinc/files/boinc.init
index fb2aa40707ba..efa7355f10c3 100644
--- a/sci-misc/boinc/files/boinc.init
+++ b/sci-misc/boinc/files/boinc.init
@@ -9,31 +9,31 @@ depend() {
}
create_work_directory() {
- if [[ ! -d ${RUNTIMEDIR} ]]; then
+ if [ ! -d "${RUNTIMEDIR}" ]; then
einfo "Directory ${RUNTIMEDIR} not existing, creating now."
- mkdir ${RUNTIMEDIR}
- chown ${USER}:${GROUP} ${RUNTIMEDIR}
- if [[ ! -d ${RUNTIMEDIR} ]]; then
+ 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
+ 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/lib/libcudart.so ]]; then
+ if [ -f /opt/cuda/lib/libcudart.so ]; then
# symlink wont harm :]
- ln -snf /opt/cuda/lib/libcudart.so ${RUNTIMEDIR}/libcudart.so
+ ln -snf /opt/cuda/lib/libcudart.so "${RUNTIMEDIR}"/libcudart.so
fi
}
@@ -43,9 +43,9 @@ start() {
create_work_directory
cuda_check
- pushd ${RUNTIMEDIR} > /dev/null
+ cd "${RUNTIMEDIR}"
- if [[ ! -f lockfile ]]; then
+ if [ ! -f 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."
@@ -58,36 +58,36 @@ start() {
generate_logs
- if [[ ${ALLOW_REMOTE_RPC} = "yes" ]]; then
+ 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}"
+ if [ -n "${RC_UNAME}" ]; then
+ PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}"
else
- PARAMS="-- ${ARGS} >> ${LOGFILE} 2>&1 &"
+ PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1 &"
fi
eval ${CHRT} start-stop-daemon \
- --quiet --start --chdir ${RUNTIMEDIR} \
- --pidfile ${PIDFILE} \
+ --quiet --start --chdir "${RUNTIMEDIR}" \
+ --pidfile "${PIDFILE}" \
--make-pidfile \
- --exec ${BOINCBIN} --chuid ${USER}:${GROUP} \
- --nicelevel ${NICELEVEL} \
+ --exec "${BOINCBIN}" --chuid "${USER}:${GROUP}" \
+ --nicelevel "${NICELEVEL}" \
${PARAMS}
RESULT=$?
- if [ "${CPU_SHARE}" -a -d /sys/kernel/uids ]; then
- BUID=`id -u ${USER}`
+ if [ "${CPU_SHARE}" ] && [ -d /sys/kernel/uids ]; then
+ BUID="$(id -u "${USER}")"
# It might take a moment for start-stop-daemon to chuid
- [[ -d /sys/kernel/uids/${BUID} ]] || sleep 5 # 5 was working always here
- if [[ -w /sys/kernel/uids/${BUID}/cpu_share ]]; then
- echo ${CPU_SHARE} > /sys/kernel/uids/${BUID}/cpu_share
+ [ -d /sys/kernel/uids/"${BUID}" ] || sleep 5 # 5 was working always here
+ if [ -w /sys/kernel/uids/"${BUID}"/cpu_share ]; then
+ echo "${CPU_SHARE}" > /sys/kernel/uids/"${BUID}"/cpu_share
fi
fi
@@ -101,25 +101,24 @@ attach() {
read key
RC_QUIET_STDOUT="yes" svc_status
- if [[ $? = 1 ]]; then
+ if [ $? = 1 ]; then
svc_start
fi
ebegin "Attaching to project"
# we have to work in runtime directory
- pushd ${RUNTIMEDIR} > /dev/null
+ cd "${RUNTIMEDIR}"
# boinc does not return 1 when it fails currently
- ${BOINCBIN} --chuid ${USER}:${GROUP} --attach_project ${url} ${key} &> /dev/null
- popd > /dev/null
+ "${BOINCBIN}" --chuid "${USER}:${GROUP}" --attach_project "${url}" "${key}" &> /dev/null
eend $?
sleep 10
- tail ${LOGFILE}
+ tail "${LOGFILE}"
}
stop() {
ebegin "Stopping BOINC"
- start-stop-daemon --stop --retry 3 --quiet --exec ${BOINCBIN}
- rm -f ${PIDFILE}
+ start-stop-daemon --stop --retry 3 --quiet --exec "${BOINCBIN}"
+ rm -f "${PIDFILE}"
eend $?
}