From a25526c8f7c0a715182a4a76e6606b628198c723 Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Thu, 15 Dec 2005 01:34:04 +0000 Subject: The SETI@home project moves to a new software client based on BOINC. Please install astro/boinc-setiathome. See http://setiathome.ssl.berkeley.edu/, November 15, 2005 for more information. PR: ports/89525 Submitted by: Edwin Groothuis --- astro/setiathome/pkg-install | 161 ------------------------------------------- 1 file changed, 161 deletions(-) delete mode 100644 astro/setiathome/pkg-install (limited to 'astro/setiathome/pkg-install') diff --git a/astro/setiathome/pkg-install b/astro/setiathome/pkg-install deleted file mode 100644 index f8a894900587..000000000000 --- a/astro/setiathome/pkg-install +++ /dev/null @@ -1,161 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# Set up the work area and run SETI@home to login or register. -# - -[ $# != 2 ] && exit 1 -[ -z "${PKG_PREFIX}" ] && exit 1 -[ -n "${BATCH}" ] && exit 0 - -PKG_NAME=${1%%-[0-9._]*} -PKG_ACTION=$2 - -# override these variables in ${PREFIX}/etc/rc.setiathome.conf -seti_wrkdir=/var/db/${PKG_NAME} # working directory -seti_user=setiathome # user id to run under -seti_maxprocs=$(sysctl -n hw.ncpu) # max. number of processes to start - -rcconf_dir=${PKG_PREFIX}/etc -rcconf_file=rc.${PKG_NAME}.conf -rcconf_path=${rcconf_dir}/${rcconf_file} - -if [ -f ${rcconf_path} ]; then - . ${rcconf_path} -fi - -rc_dir=${PKG_PREFIX}/etc/rc.d -rc_file=${PKG_NAME}.sh -rc_path=${rc_dir}/${rc_file} - -ncpu=$(sysctl -n hw.ncpu) - -case "${PKG_ACTION}" in -POST-INSTALL) - if [ -f ${seti_wrkdir}/user_info.sah ]; then -echo "**** SETI@home already has a working directory for temporary files and" -echo " you seem to be already registered with SETI@home." -echo -echo -n " Would you like repeat the registration with SETI@home? [y/N] " - read ans -echo - if [ "X${ans}" = "XY" -o "X${ans}" = "Xy" ]; then - register=yes - else - register=no - fi - else -echo "**** SETI@home requires a working directory for temporary files and a" -echo " brief registration process." -echo -echo " Would you like to set up a working directory in ${seti_wrkdir}," - if [ ${seti_maxprocs} -gt 1 ]; then -echo " register with SETI@home, and let me arrange for ${ncpu} setiathome" - if [ ${ncpu} -eq ${seti_maxprocs} ]; then -echo " processes (one for each of your ${ncpu} CPUs) to be started" -echo -n " automatically as user \`${seti_user}'? [Y/n] " - else -echo " processes (as configured) to be started automatically as user" -echo -n " \`${seti_user}'? [Y/n] " - fi - else -echo " register with SETI@home, and let me arrange for setiathome to be" -echo -n " started automatically as user \`${seti_user}'? [Y/n] " - fi - read ans -echo - if [ "X${ans}" = "XN" -o "X${ans}" = "Xn" ]; then -echo "**** Please set up the working directory yourself. You may use" -echo " ${rc_path} register" -echo " to do so. See setiathome(1) for details." - exit 0 - else - register=yes - fi - fi - if [ "${register}" = "yes" ]; then - ${rc_path} register - if [ ! -f ${seti_wrkdir}/user_info.sah ]; then -echo "unable to start setiathome: it seems registration or login failed." -echo "See setiathome(1) for details." - exit 0 - fi - fi - ${rc_path} start > /dev/null -echo -echo "**** Congratulations! Your system now participates in the search for" -echo " extra-terrestrial intelligence. Be sure to visit the home page" -echo " at http://setiathome.ssl.berkeley.edu/" -echo " See setiathome(1) for further details." - ;; - -DEINSTALL) - if [ ! -d ${seti_wrkdir} ]; then - exit 0 - fi - - ${rc_path} stop > /dev/null - -echo "**** SETI@home working directory and temporary files have to be" -echo " removed to complete the deinstallation process. Of course," -echo " you may prefer to keep them for futher researchs? Would you" -echo " like to remove it as well as all temporary files it may" -echo -n " contains? [y/N] " - read a -echo - if [ "X$a" != "XY" -a "X$a" != "Xy" ]; then -echo "**** SETI@home working directory and temporary files left untouched." - exit 0 - fi - for i in ${seti_wrkdir}/.??* ${seti_wrkdir}/*; do - case "${i}" in - "${seti_wrkdir}/.??*"|"${seti_wrkdir}/*") - continue - ;; - */.tkseti*|*.sah) - [ -f ${i} ] || continue - rm -f ${i} - ;; - *) - [ -d ${i} ] || continue - for j in ${seti_wrkdir}/*; do - case "${j}" in - "${seti_wrkdir}/*") - continue - ;; - */.tkseti*|*.sah) - [ -f ${j} ] || continue - rm -f ${j} - ;; - esac - done - rmdir ${i} - ;; - esac - done - rmdir ${seti_wrkdir} - if [ -d ${seti_wrkdir} ]; then -echo "**** SETI@home working directory can't be removed since it contains" -echo " non SETI@home files or directories. You have to remove it" -echo " manually. You can use" -echo " rm -rf ${seti_wrkdir}" -echo " to do so, but think about it twince before." - else -echo "**** SETI@home working directory and temporary files removed." - fi - if pw usershow "${seti_user}" 2>/dev/null 1>&2; then -echo "To permanently delete SETI@home user, use 'pw userdel ${seti_user}'" - fi - ;; - -PRE-INSTALL|POST-DEINSTALL) - ;; - -*) -echo "usage: $0 {PRE-INSTALL|POST-INSTALL|DEINSTALL|POST-DEINSTALL}" >&2 - exit 1 - ;; -esac - -exit 0 -- cgit v1.2.3