Gentoo Archives: gentoo-commits

From: "Alexey Shvetsov (alexxy)" <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-cluster/maui/files: maui.initd
Date: Wed, 29 Jun 2011 13:55:19
Message-Id: 20110629135509.AC51F20057@flycatcher.gentoo.org
1 alexxy 11/06/29 13:55:09
2
3 Added: maui.initd
4 Log:
5 [sys-cluster/maui] Add new init.d
6
7 (Portage version: 2.2.0_alpha41/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 sys-cluster/maui/files/maui.initd
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/maui/files/maui.initd?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/maui/files/maui.initd?rev=1.1&content-type=text/plain
14
15 Index: maui.initd
16 ===================================================================
17 #!/sbin/runscript
18 # Copyright 1999-2011 Gentoo Foundation
19 # Distributed under the terms of the GNU General Public License v2
20 # $Header: /var/cvsroot/gentoo-x86/sys-cluster/maui/files/maui.initd,v 1.1 2011/06/29 13:55:09 alexxy Exp $
21
22 . /etc/conf.d/torque
23 PBS_SERVER_HOME="$(. /etc/env.d/25torque; echo ${PBS_SERVER_HOME})"
24
25 depend() {
26 need net
27 after pbs_server
28 before pbs_mom
29 after logger
30 }
31
32 checkconfig() {
33 for i in "server_name"; do
34 if [ ! -e ${PBS_SERVER_HOME}/${i} ]; then
35 eerror "Missing config file ${PBS_SERVER_HOME}/${i}"
36 return 1
37 fi
38 done
39
40 if [ -z "$(grep 'queue_type' ${PBS_SERVER_HOME}/server_priv/queues/*)" ]; then
41 eerror "No queues have been defined yet."
42 return 1
43 fi
44 }
45
46 start() {
47 checkconfig || return 1
48
49 ebegin "Starting Maui scheduler"
50 local extra_args=""
51
52 start-stop-daemon --start --exec /usr/sbin/maui
53 eend ${?}
54 }
55
56 stop() {
57 ebegin "Stopping Maui scheduler"
58 start-stop-daemon --stop -p /usr/spool/maui/maui.pid
59 eend ${?}
60 }
61 # vim:ts=4