* [gentoo-commits] proj/sci:master commit in: sys-cluster/slurm/, sys-cluster/slurm/files/
@ 2011-07-03 21:48 Alexey Shvetsov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Shvetsov @ 2011-07-03 21:48 UTC (permalink / raw
  To: gentoo-commits
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."
 }
^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sys-cluster/slurm/, sys-cluster/slurm/files/
@ 2011-07-03 22:11 Alexey Shvetsov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Shvetsov @ 2011-07-03 22:11 UTC (permalink / raw
  To: gentoo-commits
commit:     4b150b91ea4f76e331f2527599b19ba921651ac8
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  3 22:11:31 2011 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Sun Jul  3 22:11:31 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=4b150b91
Update init.d
(Portage version: 2.2.0_alpha43/git/Linux x86_64, signed Manifest commit with key F82F92E6)
---
 sys-cluster/slurm/files/slurm.confd     |    5 +++++
 sys-cluster/slurm/files/slurmctld.confd |    2 --
 sys-cluster/slurm/files/slurmctld.initd |    2 ++
 sys-cluster/slurm/files/slurmd.confd    |    2 --
 sys-cluster/slurm/files/slurmd.initd    |    2 ++
 sys-cluster/slurm/files/slurmdbd.confd  |    2 --
 sys-cluster/slurm/files/slurmdbd.initd  |    2 ++
 sys-cluster/slurm/slurm-2.2.7.ebuild    |   10 +++++++---
 8 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/sys-cluster/slurm/files/slurm.confd b/sys-cluster/slurm/files/slurm.confd
new file mode 100644
index 0000000..13b6914
--- /dev/null
+++ b/sys-cluster/slurm/files/slurm.confd
@@ -0,0 +1,5 @@
+# /etc/conf.d/slurm: config file for /etc/init.d/slurm*
+SLURMCTLD_OPTIONS=""
+SLURMDBD_OPTIONS=""
+SLURMD_OPTIONS=""
+SLURM_USE_MUNGE="0"
diff --git a/sys-cluster/slurm/files/slurmctld.confd b/sys-cluster/slurm/files/slurmctld.confd
deleted file mode 100644
index 0f98eca..0000000
--- a/sys-cluster/slurm/files/slurmctld.confd
+++ /dev/null
@@ -1,2 +0,0 @@
-# /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
index 0d889d9..8b4e501 100644
--- a/sys-cluster/slurm/files/slurmctld.initd
+++ b/sys-cluster/slurm/files/slurmctld.initd
@@ -5,6 +5,8 @@
 
 opts="reload"
 
+[[ -f /etc/conf.d/slurm ]] && . /etc/conf.d/slurm
+
 depend() {
 	local _need="net"
 	[ ${SLURM_USE_MUNGE} -ne 0 ] && _need="${_need} munged"
diff --git a/sys-cluster/slurm/files/slurmd.confd b/sys-cluster/slurm/files/slurmd.confd
deleted file mode 100644
index 39ca725..0000000
--- a/sys-cluster/slurm/files/slurmd.confd
+++ /dev/null
@@ -1,2 +0,0 @@
-# /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
index 7102863..07312d5 100644
--- a/sys-cluster/slurm/files/slurmd.initd
+++ b/sys-cluster/slurm/files/slurmd.initd
@@ -5,6 +5,8 @@
 
 opts="reload"
 
+[[ -f /etc/conf.d/slurm ]] && . /etc/conf.d/slurm
+
 depend() {
 	local _need="net"
 	[ ${SLURM_USE_MUNGE} -ne 0 ] && _need="${_need} munged"
diff --git a/sys-cluster/slurm/files/slurmdbd.confd b/sys-cluster/slurm/files/slurmdbd.confd
deleted file mode 100644
index 7b3ea99..0000000
--- a/sys-cluster/slurm/files/slurmdbd.confd
+++ /dev/null
@@ -1,2 +0,0 @@
-# /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
index 61aa45a..a8b7bb9 100644
--- a/sys-cluster/slurm/files/slurmdbd.initd
+++ b/sys-cluster/slurm/files/slurmdbd.initd
@@ -5,6 +5,8 @@
 
 opts="reload"
 
+[[ -f /etc/conf.d/slurm ]] && . /etc/conf.d/slurm
+
 depend() {
 	local _need="net"
 	[ ${SLURM_USE_MUNGE} -ne 0 ] && _need="${_need} munged"
diff --git a/sys-cluster/slurm/slurm-2.2.7.ebuild b/sys-cluster/slurm/slurm-2.2.7.ebuild
index 0c6e9a5..ff9e1f2 100644
--- a/sys-cluster/slurm/slurm-2.2.7.ebuild
+++ b/sys-cluster/slurm/slurm-2.2.7.ebuild
@@ -85,9 +85,13 @@ src_install() {
 	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
+	newconfd "${FILESDIR}/slurm.confd" slurmd
+}
+
+pkg_preinst() {
+	if use munge; then
+		sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${D}"etc/conf.d/slurm || die
+	fi
 }
 
 pkg_postinst() {
^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sys-cluster/slurm/, sys-cluster/slurm/files/
@ 2011-07-03 22:56 Alexey Shvetsov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Shvetsov @ 2011-07-03 22:56 UTC (permalink / raw
  To: gentoo-commits
commit:     e78f6a691f2455bd8d71840f59daa5622e3eef48
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  3 22:56:19 2011 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Sun Jul  3 22:56:19 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e78f6a69
Fix permissions
(Portage version: 2.2.0_alpha43/git/Linux x86_64, signed Manifest commit with key F82F92E6)
---
 sys-cluster/slurm/files/slurmctld.initd |    4 ++--
 sys-cluster/slurm/files/slurmd.initd    |    4 ++--
 sys-cluster/slurm/files/slurmdbd.initd  |    4 ++--
 sys-cluster/slurm/slurm-2.2.7.ebuild    |    9 +++++++++
 4 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/sys-cluster/slurm/files/slurmctld.initd b/sys-cluster/slurm/files/slurmctld.initd
index 2e4c0fc..8cd7fa5 100644
--- a/sys-cluster/slurm/files/slurmctld.initd
+++ b/sys-cluster/slurm/files/slurmctld.initd
@@ -26,7 +26,7 @@ checkconfig() {
 start() {
 	ebegin "Starting slurm control daemon"
 	start-stop-daemon --start --quiet --background \
-		--pidfile /var/run/slurmctld.pid \
+		--pidfile /var/run/slurm/slurmctld.pid \
 		--user slurm \
 		--group slurm \
 		--exec /usr/sbin/slurmctld -- ${SLURMCTLD_OPTS}
@@ -35,7 +35,7 @@ start() {
 
 stop() {
 	ebegin "Stopping slurm control daemon"
-	start-stop-daemon --stop --pidfile /var/run/slurmctld.pid
+	start-stop-daemon --stop --pidfile /var/run/slurm/slurmctld.pid
 	eend $?
 }
 
diff --git a/sys-cluster/slurm/files/slurmd.initd b/sys-cluster/slurm/files/slurmd.initd
index 6964f93..7a0449d 100644
--- a/sys-cluster/slurm/files/slurmd.initd
+++ b/sys-cluster/slurm/files/slurmd.initd
@@ -26,7 +26,7 @@ checkconfig() {
 start() {
 	ebegin "Starting slurm daemon"
 	start-stop-daemon --start --quiet --background \
-		--pidfile /var/run/slurmd.pid \
+		--pidfile /var/run/slurm/slurmd.pid \
 		--user slurm \
 		--group slurm \
 		--exec /usr/sbin/slurmd -- ${SLURMD_OPTS}
@@ -35,7 +35,7 @@ start() {
 
 stop() {
 	ebegin "Stopping slurm daemon"
-	start-stop-daemon --stop --pidfile /var/run/slurmd.pid
+	start-stop-daemon --stop --pidfile /var/run/slurm/slurmd.pid
 	eend $?
 }
 
diff --git a/sys-cluster/slurm/files/slurmdbd.initd b/sys-cluster/slurm/files/slurmdbd.initd
index a45a785..17cfd2c 100644
--- a/sys-cluster/slurm/files/slurmdbd.initd
+++ b/sys-cluster/slurm/files/slurmdbd.initd
@@ -24,7 +24,7 @@ checkconfig() {
 start() {
 	ebegin "Starting slurmdb daemon"
 	start-stop-daemon --start --quiet --background \
-		--pidfile /var/run/slurmddb.pid \
+		--pidfile /var/run/slurm/slurmddb.pid \
 		--user slurm \
 		--group slurm \
 		--exec /usr/sbin/slurmddb -- ${SLURMD_OPTS}
@@ -33,7 +33,7 @@ start() {
 
 stop() {
 	ebegin "Stopping slurmdb daemon"
-	start-stop-daemon --stop --pidfile /var/run/slurmdbd.pid
+	start-stop-daemon --stop --pidfile /var/run/slurm/slurmdbd.pid
 	eend $?
 }
 
diff --git a/sys-cluster/slurm/slurm-2.2.7.ebuild b/sys-cluster/slurm/slurm-2.2.7.ebuild
index 00aa0b4..6478bfc 100644
--- a/sys-cluster/slurm/slurm-2.2.7.ebuild
+++ b/sys-cluster/slurm/slurm-2.2.7.ebuild
@@ -72,6 +72,7 @@ src_install() {
 	keepdir /etc/slurm
 	keepdir /var/log/slurm
 	keepdir /var/spool/slurm
+	keepdir /var/run/slurm
 	insinto /etc/slurm
 	doins etc/cgroup.conf.example
 	doins etc/federation.conf.example
@@ -95,6 +96,14 @@ pkg_preinst() {
 }
 
 pkg_postinst() {
+	einfo "Fixing permissions in /var/spool/${PN}"
+	chown -R ${PN}:${PN} /var/spool/${PN}
+	einfo "Fixing permissions in /var/run/${PN}"
+	chown -R ${PN}:${PN} /var/run/${PN}
+	einfo "Fixing permissions in /var/log/${PN}"
+	chown -R ${PN}:${PN} /var/log/${PN}
+	echo
+
 	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."
^ permalink raw reply related	[flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-03 22:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-03 21:48 [gentoo-commits] proj/sci:master commit in: sys-cluster/slurm/, sys-cluster/slurm/files/ Alexey Shvetsov
  -- strict thread matches above, loose matches on Subject: below --
2011-07-03 22:11 Alexey Shvetsov
2011-07-03 22:56 Alexey Shvetsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox