Gentoo Archives: gentoo-commits

From: Alexey Shvetsov <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sys-cluster/slurm/, sys-cluster/slurm/files/
Date: Sun, 03 Jul 2011 21:49:01
Message-Id: 6819eaed1ebd28f03cdf5042b49488c3ed21095e.alexxy@gentoo
1 commit: 6819eaed1ebd28f03cdf5042b49488c3ed21095e
2 Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 3 21:48:27 2011 +0000
4 Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 3 21:48:27 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=6819eaed
7
8 Add init.d and conf.d files
9
10 (Portage version: 2.2.0_alpha43/git/Linux x86_64, signed Manifest commit with key F82F92E6)
11
12 ---
13 sys-cluster/slurm/files/slurmctld.confd | 2 +
14 sys-cluster/slurm/files/slurmctld.initd | 44 +++++++++++++++++++++++++++++++
15 sys-cluster/slurm/files/slurmd.confd | 2 +
16 sys-cluster/slurm/files/slurmd.initd | 44 +++++++++++++++++++++++++++++++
17 sys-cluster/slurm/files/slurmdbd.confd | 2 +
18 sys-cluster/slurm/files/slurmdbd.initd | 42 +++++++++++++++++++++++++++++
19 sys-cluster/slurm/slurm-2.2.7.ebuild | 18 +++++++++++-
20 7 files changed, 152 insertions(+), 2 deletions(-)
21
22 diff --git a/sys-cluster/slurm/files/slurmctld.confd b/sys-cluster/slurm/files/slurmctld.confd
23 new file mode 100644
24 index 0000000..0f98eca
25 --- /dev/null
26 +++ b/sys-cluster/slurm/files/slurmctld.confd
27 @@ -0,0 +1,2 @@
28 +# /etc/conf.d/slurmctld: config file for /etc/init.d/slurmctld
29 +SLURMCTLD_OPTIONS=""
30
31 diff --git a/sys-cluster/slurm/files/slurmctld.initd b/sys-cluster/slurm/files/slurmctld.initd
32 new file mode 100644
33 index 0000000..0d889d9
34 --- /dev/null
35 +++ b/sys-cluster/slurm/files/slurmctld.initd
36 @@ -0,0 +1,44 @@
37 +#!/sbin/runscript
38 +# Copyright 1999-2011 Gentoo Foundation
39 +# Distributed under the terms of the GNU General Public License v2
40 +# $Header: $
41 +
42 +opts="reload"
43 +
44 +depend() {
45 + local _need="net"
46 + [ ${SLURM_USE_MUNGE} -ne 0 ] && _need="${_need} munged"
47 + after logger
48 + need ${_need}
49 +}
50 +
51 +checkconfig() {
52 + if [ ! -e "/etc/slurm/slurm.conf" ]; then
53 + eerror "Missing config /etc/slurm/slurm.conf"
54 + eerror "Customize sample one or generate new by configurator.html"
55 + eerror "in slurm doc directory"
56 + return 1
57 + fi
58 +}
59 +
60 +start() {
61 + ebegin "Starting slurm control daemon"
62 + start-stop-daemon --start --quiet --background \
63 + --pidfile /var/run/slurmctld.pid \
64 + --user slurm \
65 + --group slurm \
66 + --exec /usr/sbin/slurmctld -- ${SLURMCTLD_OPTS}
67 + eend $?
68 +}
69 +
70 +stop() {
71 + ebegin "Stopping slurm control daemon"
72 + start-stop-daemon --stop --pidfile /var/run/slurmctld.pid
73 + eend $?
74 +}
75 +
76 +reload() {
77 + ebegin "Reloading slurm daemon configuration"
78 + killproc slurmctld -HUP
79 + eend $?
80 +}
81
82 diff --git a/sys-cluster/slurm/files/slurmd.confd b/sys-cluster/slurm/files/slurmd.confd
83 new file mode 100644
84 index 0000000..39ca725
85 --- /dev/null
86 +++ b/sys-cluster/slurm/files/slurmd.confd
87 @@ -0,0 +1,2 @@
88 +# /etc/conf.d/slurd: config file for /etc/init.d/slurd
89 +SLURMD_OPTIONS=""
90
91 diff --git a/sys-cluster/slurm/files/slurmd.initd b/sys-cluster/slurm/files/slurmd.initd
92 new file mode 100644
93 index 0000000..7102863
94 --- /dev/null
95 +++ b/sys-cluster/slurm/files/slurmd.initd
96 @@ -0,0 +1,44 @@
97 +#!/sbin/runscript
98 +# Copyright 1999-2011 Gentoo Foundation
99 +# Distributed under the terms of the GNU General Public License v2
100 +# $Header: $
101 +
102 +opts="reload"
103 +
104 +depend() {
105 + local _need="net"
106 + [ ${SLURM_USE_MUNGE} -ne 0 ] && _need="${_need} munged"
107 + after logger
108 + need ${_need}
109 +}
110 +
111 +checkconfig() {
112 + if [ ! -e "/etc/slurm/slurm.conf" ]; then
113 + eerror "Missing config /etc/slurm/slurm.conf"
114 + eerror "Customize sample one or generate new by configurator.html"
115 + eerror "in slurm doc directory"
116 + return 1
117 + fi
118 +}
119 +
120 +start() {
121 + ebegin "Starting slurm daemon"
122 + start-stop-daemon --start --quiet --background \
123 + --pidfile /var/run/slurmd.pid \
124 + --user slurm \
125 + --group slurm \
126 + --exec /usr/sbin/slurmd -- ${SLURMD_OPTS}
127 + eend $?
128 +}
129 +
130 +stop() {
131 + ebegin "Stopping slurm daemon"
132 + start-stop-daemon --stop --pidfile /var/run/slurmd.pid
133 + eend $?
134 +}
135 +
136 +reload() {
137 + ebegin "Reloading slurm daemon configuration"
138 + killproc slurmd -HUP
139 + eend $?
140 +}
141
142 diff --git a/sys-cluster/slurm/files/slurmdbd.confd b/sys-cluster/slurm/files/slurmdbd.confd
143 new file mode 100644
144 index 0000000..7b3ea99
145 --- /dev/null
146 +++ b/sys-cluster/slurm/files/slurmdbd.confd
147 @@ -0,0 +1,2 @@
148 +# /etc/conf.d/slurmdbd: config file for /etc/init.d/slurmdbd
149 +SLURMDBD_OPTIONS=""
150
151 diff --git a/sys-cluster/slurm/files/slurmdbd.initd b/sys-cluster/slurm/files/slurmdbd.initd
152 new file mode 100644
153 index 0000000..61aa45a
154 --- /dev/null
155 +++ b/sys-cluster/slurm/files/slurmdbd.initd
156 @@ -0,0 +1,42 @@
157 +#!/sbin/runscript
158 +# Copyright 1999-2011 Gentoo Foundation
159 +# Distributed under the terms of the GNU General Public License v2
160 +# $Header: $
161 +
162 +opts="reload"
163 +
164 +depend() {
165 + local _need="net"
166 + [ ${SLURM_USE_MUNGE} -ne 0 ] && _need="${_need} munged"
167 + after logger
168 + need ${_need}
169 +}
170 +
171 +checkconfig() {
172 + if [ ! -e "/etc/slurm/slurmdbd.conf" ]; then
173 + eerror "Missing config /etc/slurm/slurmdbd.conf"
174 + return 1
175 + fi
176 +}
177 +
178 +start() {
179 + ebegin "Starting slurmdb daemon"
180 + start-stop-daemon --start --quiet --background \
181 + --pidfile /var/run/slurmddb.pid \
182 + --user slurm \
183 + --group slurm \
184 + --exec /usr/sbin/slurmddb -- ${SLURMD_OPTS}
185 + eend $?
186 +}
187 +
188 +stop() {
189 + ebegin "Stopping slurmdb daemon"
190 + start-stop-daemon --stop --pidfile /var/run/slurmdbd.pid
191 + eend $?
192 +}
193 +
194 +reload() {
195 + ebegin "Reloading slurmdb daemon configuration"
196 + killproc slurmdbd -HUP
197 + eend $?
198 +}
199
200 diff --git a/sys-cluster/slurm/slurm-2.2.7.ebuild b/sys-cluster/slurm/slurm-2.2.7.ebuild
201 index 4bc31bd..3b3fcf8 100644
202 --- a/sys-cluster/slurm/slurm-2.2.7.ebuild
203 +++ b/sys-cluster/slurm/slurm-2.2.7.ebuild
204 @@ -74,9 +74,23 @@ src_install() {
205 keepdir /var/spool/slurm
206 insinto /etc/slurm
207 doins etc/cgroup.conf.example
208 - doins etc/cgroup.release_agent
209 + doexe etc/cgroup.release_agent
210 doins etc/federation.conf.example
211 doins etc/slurm.conf.example
212 doins etc/slurmdbd.conf.example
213 - doins etc/slurm.epilog.clean
214 + doexe etc/slurm.epilog.clean
215 + # install init.d files
216 + newinitd "${FILESDIR}/slurmd.initd" slurmd
217 + newinitd "${FILESDIR}/slurmctld.initd" slurmctld
218 + newinitd "${FILESDIR}/slurmdbd.initd" slurmdbd
219 + # install conf.d files
220 + newconfd "${FILESDIR}/slurmd.confd" slurmd
221 + newconfd "${FILESDIR}/slurmctld.confd" slurmctld
222 + newconfd "${FILESDIR}/slurmdbd.confd" slurmdbd
223 +}
224 +
225 +pkg_postinst() {
226 + elog "Please visit the file '/usr/share/doc/${P}/html/configurator.html"
227 + elog "through a (javascript enabled) browser to create a configureation file."
228 + elog "Copy that file to /etc/slurm.conf on all nodes (including the headnode) of your cluster."
229 }