diff options
author | Daniel Ahlberg <aliz@gentoo.org> | 2002-11-04 12:52:54 +0000 |
---|---|---|
committer | Daniel Ahlberg <aliz@gentoo.org> | 2002-11-04 12:52:54 +0000 |
commit | 5d8045d7633a6c55ae83a2f1d7d2fbaba0a7b5ce (patch) | |
tree | b3b50135cd49f00cdd68805a2fdf34a0c98848cb /app-sci/setiathome | |
parent | Version bump and rename (diff) | |
download | historical-5d8045d7633a6c55ae83a2f1d7d2fbaba0a7b5ce.tar.gz historical-5d8045d7633a6c55ae83a2f1d7d2fbaba0a7b5ce.tar.bz2 historical-5d8045d7633a6c55ae83a2f1d7d2fbaba0a7b5ce.zip |
Closes #7483.
Diffstat (limited to 'app-sci/setiathome')
-rw-r--r-- | app-sci/setiathome/ChangeLog | 6 | ||||
-rw-r--r-- | app-sci/setiathome/files/seti-init.d-r1 | 67 |
2 files changed, 52 insertions, 21 deletions
diff --git a/app-sci/setiathome/ChangeLog b/app-sci/setiathome/ChangeLog index 588cd957f697..8f861c5c5511 100644 --- a/app-sci/setiathome/ChangeLog +++ b/app-sci/setiathome/ChangeLog @@ -1,9 +1,13 @@ # ChangeLog for app-sci/setiathome # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/app-sci/setiathome/ChangeLog,v 1.3 2002/09/19 20:22:36 owen Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-sci/setiathome/ChangeLog,v 1.4 2002/11/04 12:52:54 aliz Exp $ *setiathome-3.03 (19 Jul 2002) + 04 Nov 2002; Daniel Ahlberg <aliz@gentoo.orv> files/seti-init.d : + Updated init.d script to take advantage of SMP. Script contributed by + delta407 <delta407@lerfjhax.com> in #7483. + 19 Sep 2002; Owen Stampflee <owen@gentoo.org> : Added PPC to KEYWORDS. diff --git a/app-sci/setiathome/files/seti-init.d-r1 b/app-sci/setiathome/files/seti-init.d-r1 index 8433e18bb2c0..e8f34956bfa6 100644 --- a/app-sci/setiathome/files/seti-init.d-r1 +++ b/app-sci/setiathome/files/seti-init.d-r1 @@ -1,31 +1,58 @@ #!/sbin/runscript +cpus=`grep -c processor /proc/cpuinfo` + checkconfig() { - if [ ! -e ${SETIATHOME_DIR} ] - then - einfo "Creating ${SETIATHOME_DIR}" - mkdir ${SETIATHOME_DIR} - fi - - if [ ! -e ${SETIATHOME_DIR}/user_info.sah ] - then - einfo "Setting up SETI@home for the first time" - cd ${SETIATHOME_DIR} - ./setiathome -login - fi + if [ ! -e ${SETIATHOME_DIR} ] + then + einfo "Creating ${SETIATHOME_DIR}" + mkdir ${SETIATHOME_DIR} + fi + + if [ ! -e ${SETIATHOME_DIR}/user_info.sah ] + then + einfo "Setting up SETI@home for the first time" + cd ${SETIATHOME_DIR} + ./setiathome -login + fi + + if [ $cpus != '1' ]; then + cd ${SETIATHOME_DIR} + for cpu in `seq 2 $cpus`; do + if [ ! -e ${SETIATHOME_DIR}/cpu${cpu} ]; then + mkdir ${SETIATHOME_DIR}/cpu${cpu} + cp ${SETIATHOME_DIR}/* ${SETIATHOME_DIR}/cpu${cpu} > /dev/null + rm ${SETIATHOME_DIR}/cpu${cpu}/*.sah > /dev/null + cp ${SETIATHOME_DIR}/user_info.sah ${SETIATHOME_DIR}/cpu${cpu} + fi + done + fi } start() { - checkconfig + checkconfig + + + if [ $cpus = '1' ]; then + ebegin "Starting SETI@home" + else + ebegin "Starting SETI@home ($cpus processors)" + fi + + for cpu in `seq 1 $cpus`; do + cd ${SETIATHOME_DIR} + if [ $cpu != '1' ]; then + cd cpu${cpu} + fi + + ./setiathome ${SETIATHOME_OPTIONS} >&/dev/null& + done - ebegin "Starting SETI@home" - cd ${SETIATHOME_DIR} - ./setiathome ${SETIATHOME_OPTIONS} >&/dev/null& - eend $? + eend $? } stop() { - ebegin "Stopping SETI@home" - killall setiathome - eend $? + ebegin "Stopping SETI@home" + killall setiathome + eend $? } |