public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alexey Shvetsov" <alexxy@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sys-cluster/slurm/, sys-cluster/slurm/files/
Date: Sun,  3 Jul 2011 21:48:51 +0000 (UTC)	[thread overview]
Message-ID: <6819eaed1ebd28f03cdf5042b49488c3ed21095e.alexxy@gentoo> (raw)

commit:     6819eaed1ebd28f03cdf5042b49488c3ed21095e
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  3 21:48:27 2011 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Sun Jul  3 21:48:27 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=6819eaed

Add init.d and conf.d files

(Portage version: 2.2.0_alpha43/git/Linux x86_64, signed Manifest commit with key F82F92E6)

---
 sys-cluster/slurm/files/slurmctld.confd |    2 +
 sys-cluster/slurm/files/slurmctld.initd |   44 +++++++++++++++++++++++++++++++
 sys-cluster/slurm/files/slurmd.confd    |    2 +
 sys-cluster/slurm/files/slurmd.initd    |   44 +++++++++++++++++++++++++++++++
 sys-cluster/slurm/files/slurmdbd.confd  |    2 +
 sys-cluster/slurm/files/slurmdbd.initd  |   42 +++++++++++++++++++++++++++++
 sys-cluster/slurm/slurm-2.2.7.ebuild    |   18 +++++++++++-
 7 files changed, 152 insertions(+), 2 deletions(-)

diff --git a/sys-cluster/slurm/files/slurmctld.confd b/sys-cluster/slurm/files/slurmctld.confd
new file mode 100644
index 0000000..0f98eca
--- /dev/null
+++ b/sys-cluster/slurm/files/slurmctld.confd
@@ -0,0 +1,2 @@
+# /etc/conf.d/slurmctld: config file for /etc/init.d/slurmctld
+SLURMCTLD_OPTIONS=""

diff --git a/sys-cluster/slurm/files/slurmctld.initd b/sys-cluster/slurm/files/slurmctld.initd
new file mode 100644
index 0000000..0d889d9
--- /dev/null
+++ b/sys-cluster/slurm/files/slurmctld.initd
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+opts="reload"
+
+depend() {
+	local _need="net"
+	[ ${SLURM_USE_MUNGE} -ne 0 ] && _need="${_need} munged"
+	after logger
+	need ${_need}
+}
+
+checkconfig() {
+	if [ ! -e "/etc/slurm/slurm.conf" ]; then
+		eerror "Missing config /etc/slurm/slurm.conf"
+		eerror "Customize sample one or generate new by configurator.html"
+		eerror "in slurm doc directory"
+		return 1
+	fi
+}
+
+start() {
+	ebegin "Starting slurm control daemon"
+	start-stop-daemon --start --quiet --background \
+		--pidfile /var/run/slurmctld.pid \
+		--user slurm \
+		--group slurm \
+		--exec /usr/sbin/slurmctld -- ${SLURMCTLD_OPTS}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping slurm control daemon"
+	start-stop-daemon --stop --pidfile /var/run/slurmctld.pid
+	eend $?
+}
+
+reload() {
+	ebegin "Reloading slurm daemon configuration"
+	killproc slurmctld -HUP
+	eend $?
+}

diff --git a/sys-cluster/slurm/files/slurmd.confd b/sys-cluster/slurm/files/slurmd.confd
new file mode 100644
index 0000000..39ca725
--- /dev/null
+++ b/sys-cluster/slurm/files/slurmd.confd
@@ -0,0 +1,2 @@
+# /etc/conf.d/slurd: config file for /etc/init.d/slurd
+SLURMD_OPTIONS=""

diff --git a/sys-cluster/slurm/files/slurmd.initd b/sys-cluster/slurm/files/slurmd.initd
new file mode 100644
index 0000000..7102863
--- /dev/null
+++ b/sys-cluster/slurm/files/slurmd.initd
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+opts="reload"
+
+depend() {
+	local _need="net"
+	[ ${SLURM_USE_MUNGE} -ne 0 ] && _need="${_need} munged"
+	after logger
+	need ${_need}
+}
+
+checkconfig() {
+	if [ ! -e "/etc/slurm/slurm.conf" ]; then
+		eerror "Missing config /etc/slurm/slurm.conf"
+		eerror "Customize sample one or generate new by configurator.html"
+		eerror "in slurm doc directory"
+		return 1
+	fi
+}
+
+start() {
+	ebegin "Starting slurm daemon"
+	start-stop-daemon --start --quiet --background \
+		--pidfile /var/run/slurmd.pid \
+		--user slurm \
+		--group slurm \
+		--exec /usr/sbin/slurmd -- ${SLURMD_OPTS}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping slurm daemon"
+	start-stop-daemon --stop --pidfile /var/run/slurmd.pid
+	eend $?
+}
+
+reload() {
+	ebegin "Reloading slurm daemon configuration"
+	killproc slurmd -HUP
+	eend $?
+}

diff --git a/sys-cluster/slurm/files/slurmdbd.confd b/sys-cluster/slurm/files/slurmdbd.confd
new file mode 100644
index 0000000..7b3ea99
--- /dev/null
+++ b/sys-cluster/slurm/files/slurmdbd.confd
@@ -0,0 +1,2 @@
+# /etc/conf.d/slurmdbd: config file for /etc/init.d/slurmdbd
+SLURMDBD_OPTIONS=""

diff --git a/sys-cluster/slurm/files/slurmdbd.initd b/sys-cluster/slurm/files/slurmdbd.initd
new file mode 100644
index 0000000..61aa45a
--- /dev/null
+++ b/sys-cluster/slurm/files/slurmdbd.initd
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+opts="reload"
+
+depend() {
+	local _need="net"
+	[ ${SLURM_USE_MUNGE} -ne 0 ] && _need="${_need} munged"
+	after logger
+	need ${_need}
+}
+
+checkconfig() {
+	if [ ! -e "/etc/slurm/slurmdbd.conf" ]; then
+		eerror "Missing config /etc/slurm/slurmdbd.conf"
+		return 1
+	fi
+}
+
+start() {
+	ebegin "Starting slurmdb daemon"
+	start-stop-daemon --start --quiet --background \
+		--pidfile /var/run/slurmddb.pid \
+		--user slurm \
+		--group slurm \
+		--exec /usr/sbin/slurmddb -- ${SLURMD_OPTS}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping slurmdb daemon"
+	start-stop-daemon --stop --pidfile /var/run/slurmdbd.pid
+	eend $?
+}
+
+reload() {
+	ebegin "Reloading slurmdb daemon configuration"
+	killproc slurmdbd -HUP
+	eend $?
+}

diff --git a/sys-cluster/slurm/slurm-2.2.7.ebuild b/sys-cluster/slurm/slurm-2.2.7.ebuild
index 4bc31bd..3b3fcf8 100644
--- a/sys-cluster/slurm/slurm-2.2.7.ebuild
+++ b/sys-cluster/slurm/slurm-2.2.7.ebuild
@@ -74,9 +74,23 @@ src_install() {
 	keepdir /var/spool/slurm
 	insinto /etc/slurm
 	doins etc/cgroup.conf.example
-	doins etc/cgroup.release_agent
+	doexe etc/cgroup.release_agent
 	doins etc/federation.conf.example
 	doins etc/slurm.conf.example
 	doins etc/slurmdbd.conf.example
-	doins etc/slurm.epilog.clean
+	doexe etc/slurm.epilog.clean
+	# install init.d files
+	newinitd "${FILESDIR}/slurmd.initd" slurmd
+	newinitd "${FILESDIR}/slurmctld.initd" slurmctld
+	newinitd "${FILESDIR}/slurmdbd.initd" slurmdbd
+	# install conf.d files
+	newconfd "${FILESDIR}/slurmd.confd" slurmd
+	newconfd "${FILESDIR}/slurmctld.confd" slurmctld
+	newconfd "${FILESDIR}/slurmdbd.confd" slurmdbd
+}
+
+pkg_postinst() {
+	elog "Please visit the file '/usr/share/doc/${P}/html/configurator.html"
+	elog "through a (javascript enabled) browser to create a configureation file."
+	elog "Copy that file to /etc/slurm.conf on all nodes (including the headnode) of your cluster."
 }



             reply	other threads:[~2011-07-03 21:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-03 21:48 Alexey Shvetsov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-07-03 22:11 [gentoo-commits] proj/sci:master commit in: sys-cluster/slurm/, sys-cluster/slurm/files/ Alexey Shvetsov
2011-07-03 22:56 Alexey Shvetsov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6819eaed1ebd28f03cdf5042b49488c3ed21095e.alexxy@gentoo \
    --to=alexxy@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox