diff options
author | 2006-03-15 23:45:58 +0000 | |
---|---|---|
committer | 2006-03-15 23:45:58 +0000 | |
commit | fce6fd2afe9083cedbe9cc4e20c95fcf94936146 (patch) | |
tree | 6ad35a75adcd6beb6ca43360ed6f61350908bdd9 /sys-cluster/openpbs-common | |
parent | deleted torque-2.0.0_p7.ebuild and changed DEPENDS for torque-2.0.0_p8.ebuild (diff) | |
download | sci-fce6fd2afe9083cedbe9cc4e20c95fcf94936146.tar.gz sci-fce6fd2afe9083cedbe9cc4e20c95fcf94936146.tar.bz2 sci-fce6fd2afe9083cedbe9cc4e20c95fcf94936146.zip |
added openpbs-common-1.1.1
git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@127 32389bae-6d03-0410-99cf-db05cde120eb
Diffstat (limited to 'sys-cluster/openpbs-common')
-rw-r--r-- | sys-cluster/openpbs-common/ChangeLog | 31 | ||||
-rw-r--r-- | sys-cluster/openpbs-common/Manifest | 7 | ||||
-rw-r--r-- | sys-cluster/openpbs-common/files/digest-openpbs-common-1.1.1 | 0 | ||||
-rw-r--r-- | sys-cluster/openpbs-common/files/pbs-conf.d | 12 | ||||
-rw-r--r-- | sys-cluster/openpbs-common/files/pbs-env.d-1.1.1 | 6 | ||||
-rw-r--r-- | sys-cluster/openpbs-common/files/pbs-init.d-1.1.1 | 135 | ||||
-rw-r--r-- | sys-cluster/openpbs-common/metadata.xml | 5 | ||||
-rw-r--r-- | sys-cluster/openpbs-common/openpbs-common-1.1.1.ebuild | 23 |
8 files changed, 219 insertions, 0 deletions
diff --git a/sys-cluster/openpbs-common/ChangeLog b/sys-cluster/openpbs-common/ChangeLog new file mode 100644 index 000000000..e2e6f4d19 --- /dev/null +++ b/sys-cluster/openpbs-common/ChangeLog @@ -0,0 +1,31 @@ +# ChangeLog for sys-cluster/openpbs-common +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*openpbs-common-1.1.1 (15 Mar 2006) + + 15 Mar 2006; Sebastien Fabbro <seb@ist.utl.pt> + +files/pbs-env.d-1.1.1, + +files/pbs-init.d-1.1.1, + +openpbs-common-1.1.1.ebuild: version bump. + From bug #115189. Thanks to Adam Carheden <adam.carheden@gmail.com>. + + 05 Sep 2005; Michael Imhof <tantive@gentoo.org> ChangeLog: + Stable on x86. + +*openpbs-common-1.1.0 (21 Jul 2005) + + 21 Jul 2005; Robin H. Johnson <robbat2@gentoo.org> +files/pbs-env.d, + +openpbs-common-1.1.0.ebuild: + This is the new env.d entry to keep the PBS directories from being removed. + + 07 Jul 2005; Markus Rothe <corsair@gentoo.org> + openpbs-common-1.0.0.ebuild: + added ~ppc64 + +*openpbs-common-1.0.0 (05 Jul 2005) + + 05 Jul 2005; Robin H. Johnson <robbat2@gentoo.org> +files/pbs-conf.d, + +files/pbs-init.d, +openpbs-common-1.0.0.ebuild, +metadata.xml: + Initial commit. Shared package for openpbs/torque init scripts and stuff. + diff --git a/sys-cluster/openpbs-common/Manifest b/sys-cluster/openpbs-common/Manifest new file mode 100644 index 000000000..f9b2de2cd --- /dev/null +++ b/sys-cluster/openpbs-common/Manifest @@ -0,0 +1,7 @@ +MD5 a45c2dea4e73c141eefe00de035dab7c ChangeLog 1031 +MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-openpbs-common-1.1.1 0 +MD5 cfb199330d75f94a15402a9d9f3bdff2 files/pbs-conf.d 448 +MD5 e0b644d4babf57a743ee3c8c810cb277 files/pbs-env.d-1.1.1 265 +MD5 e3f833ac5e4af0a26e8b77833a689329 files/pbs-init.d-1.1.1 3504 +MD5 cde8b4e93c9339eb99fe3ad45941c99b metadata.xml 160 +MD5 17edb03b90c64ce408abe2790208a98d openpbs-common-1.1.1.ebuild 476 diff --git a/sys-cluster/openpbs-common/files/digest-openpbs-common-1.1.1 b/sys-cluster/openpbs-common/files/digest-openpbs-common-1.1.1 new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/sys-cluster/openpbs-common/files/digest-openpbs-common-1.1.1 diff --git a/sys-cluster/openpbs-common/files/pbs-conf.d b/sys-cluster/openpbs-common/files/pbs-conf.d new file mode 100644 index 000000000..86a1dc76c --- /dev/null +++ b/sys-cluster/openpbs-common/files/pbs-conf.d @@ -0,0 +1,12 @@ +# /etc/conf.d/pbs +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +# Set this to 1 if you want to run both MOM and the server on the same machine. +# Set it to 0 if you don't want to run any jobs on your head/master. +#PBS_SERVER_AND_MOM=0 +PBS_SERVER_AND_MOM=1 + +# Uncomment the next 2 lines to use the maui scheduler +#PBS_SCHEDULER=maui +#PBS_SCHEDULER_PID=/usr/spool/maui/maui.pid diff --git a/sys-cluster/openpbs-common/files/pbs-env.d-1.1.1 b/sys-cluster/openpbs-common/files/pbs-env.d-1.1.1 new file mode 100644 index 000000000..81e247a0c --- /dev/null +++ b/sys-cluster/openpbs-common/files/pbs-env.d-1.1.1 @@ -0,0 +1,6 @@ +# /etc/env.d/25pbs +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +# This is to stop portage removing stuff from here. Including empty directories! +CONFIG_PROTECT="/usr/spool/PBS /var/spool/PBS" diff --git a/sys-cluster/openpbs-common/files/pbs-init.d-1.1.1 b/sys-cluster/openpbs-common/files/pbs-init.d-1.1.1 new file mode 100644 index 000000000..8f309d5b8 --- /dev/null +++ b/sys-cluster/openpbs-common/files/pbs-init.d-1.1.1 @@ -0,0 +1,135 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +opts="start stop restart" + + +# Torque moved stuff from /usr/ to /var as of 2.0.0, so we check... +PBS_CFG_DIR_DEFAULT="/var/spool/PBS" +if [ -z "${PBS_CFG_DIRECTORY}" ]; then + if [ -d "/usr/spool/PBS" -a -d "/var/spool/PBS" ]; then + ewarn "WARNING! Both /usr/spool/PBS and /var/spool/PBS exist," + ewarn " but PBS_CFG_DIRECTORY isn't defined in /etc/conf.d/pbs." + ewarn " Defaulting to ${PBS_CFG_DIR_DEFAULT}." + PBS_CFG_DIRECTORY="${PBS_CFG_DIR_DEFAULT}" + elif [ -d "/usr/spool/PBS" ]; then + PBS_CFG_DIRECTORY="/usr/spool/PBS" + elif [ -d "/var/spool/PBS" ]; then + PBS_CFG_DIRECTORY="/var/spool/PBS" + else + eerror "Neither /usr/spool/PBS nor /var/spool/PBS exists." + eerror "Are you sure you've actually installed an ebuild that provides virtual/pbs?" + eerror "Try emerging sys-cluster/torque or sys-cluster/openpbs." + exit 1 + fi +fi + +SERVERPID="${PBS_CFG_DIRECTORY}/server_priv/server.lock" +MOMPID="${PBS_CFG_DIRECTORY}/mom_priv/mom.lock" +SCHEDULER="${PBS_SCHEDULER:=pbs_sched}" +SCHEDPID="${PBS_SCHEDULER_PID:=${PBS_CFG_DIRECTORY}/sched_priv/sched.lock}" + +depend() { + need net +} + +checkconfig() { + + HOSTNAME="`hostname`" + + if [ ! -e ${PBS_CFG_DIRECTORY}/server_name ] ; then + eerror "Missing config file ${PBS_CFG_DIRECTORY}/server_name" + return 1 + else + PBS_SERVER_NAME="`cat ${PBS_CFG_DIRECTORY}/server_name`" + if [ "x${HOSTNAME}" == "x${PBS_SERVER_NAME}" ] ; then + PBS_START_SERVER=1; + else + PBS_START_SERVER=0; + fi + fi + + if [ ! -e ${PBS_CFG_DIRECTORY}/mom_priv/config ] ; then + eerror "Missing config file ${PBS_CFG_DIRECTORY}/mom_priv/config" + return 1 + elif [ "${PBS_START_SERVER}" -eq 1 ] ; then + PBS_START_MOM="${PBS_SERVER_AND_MOM:=1}" + else + PBS_START_MOM="1" + fi + + if [ "${PBS_START_SERVER}" -eq 1 ] ; then + if [ ! -e ${PBS_CFG_DIRECTORY}/server_priv/nodes ] ; then + eerror "The startup script has detected this node is a server" + eerror "from the file ${PBS_CFG_DIRECTORY}/server_name," + eerror "but the config file ${PBS_CFG_DIRECTORY}/server_priv/nodes is missing" + return 1 + fi + fi + + if [ "${PBS_START_SERVER}" -eq 1 ] ; then + SCHEDPATH="`which ${SCHEDULER}`" + SCHEDFILE="`basename ${SCHEDPATH}`" + if [ -z "${SCHEDFILE}" ]; then + eerror "No scheduler defined and can't find pbs_sched" + return 1 + elif [ ! -x ${SCHEDPATH} ] ; then + eerror "Scheduler defined but can't be executed" + return 1 + fi + fi +} + +start() { + checkconfig || return 1 + + if [ "${PBS_START_MOM}" -gt 0 ] ; then + ebegin "Starting pbs_mom" + start-stop-daemon --start --pidfile ${MOMPID} \ + --startas /usr/sbin/pbs_mom + fi + + if [ "${PBS_START_SERVER}" -gt 0 ] ; then + ebegin "Starting pbs_server" + start-stop-daemon --start --quiet --pidfile ${SERVERPID} \ + --startas /usr/sbin/pbs_server + + ebegin "Starting ${SCHEDFILE}" + start-stop-daemon --start --quiet --pidfile ${SCHEDPID} \ + --startas ${SCHEDPATH} + fi + + eend $? +} + +stop() { + checkconfig || return 1 + + ret1=0 + ret2=0 + ret3=0 + if [ -e ${MOMPID} ] ; then + ebegin "Stopping pbs_mom" + start-stop-daemon --stop --pidfile ${MOMPID} + ret1=$? + rm -f ${MOMPID} + fi + + if [ -e ${SERVERPID} ] ; then + ebegin "Stopping pbs_server" + qterm -t immediate + ret2=$? + rm -f ${SERVERPID} + fi + + if [ -e ${SCHEDPID} ] ; then + ebegin "Stopping ${SCHEDFILE}" + start-stop-daemon --stop --pidfile ${SCHEDPID} + ret3=$? + rm -f ${SCHEDPID} + fi + + let ret=$(( $ret1 + $ret2 + $ret3 )) + eend $ret +} diff --git a/sys-cluster/openpbs-common/metadata.xml b/sys-cluster/openpbs-common/metadata.xml new file mode 100644 index 000000000..348e6c4de --- /dev/null +++ b/sys-cluster/openpbs-common/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>cluster</herd> +</pkgmetadata> diff --git a/sys-cluster/openpbs-common/openpbs-common-1.1.1.ebuild b/sys-cluster/openpbs-common/openpbs-common-1.1.1.ebuild new file mode 100644 index 000000000..c9b676c6a --- /dev/null +++ b/sys-cluster/openpbs-common/openpbs-common-1.1.1.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils + +DESCRIPTION="Shared files for all OpenPBS implementations in Gentoo" +HOMEPAGE="http://www.gentoo.org" +SRC_URI="" +LICENSE="GPL-2" + +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="virtual/pbs" + +src_install() { + newinitd ${FILESDIR}/pbs-init.d-1.1.1 pbs + newconfd ${FILESDIR}/pbs-conf.d pbs + newenvd ${FILESDIR}/pbs-env.d 25pbs +} |