]> git.pld-linux.org Git - packages/cman.git/blame - cman.init
- bcond fixed
[packages/cman.git] / cman.init
CommitLineData
66cdfbf7 1#! /bin/sh
2#
3# cman This starts and stops the CMAN cluster subsystems
4#
5# chkconfig: 345 60 19
6# description: CMAN Cluster subsystems
7
8# Source function library.
9. /etc/rc.d/init.d/functions
10
11# Get Configuration variables
12[ -f /etc/sysconfig/cman ] && . /etc/sysconfig/cman
13
14# Need a cluster name
15if [ -z "$CLUSTER_NAME" ]
16then
17 echo "Cluster services not started, no cluster name"
18 exit 1
19fi
20
21set -e
22
23case "$1" in
24 start)
25 echo -n $"Starting cluster services"
26 ccsd
27 sleep 1
28 modprobe cman
29 modprobe dlm
30 modprobe lock_harness
31 modprobe gfs
32 modprobe lock_dlm
33 cman_tool join -c $CLUSTER_NAME
34 fenced
35 clvmd
36 lvm vgchange -aly &
37 touch /var/lock/subsys/cman
38 echo
39 ;;
40
41 stop)
42 echo -n $"Stopping cluster services"
43 umount -a -tgfs
44 grep "blocked" /proc/cluster/status > /dev/null
45 [ $? = 1 ] && lvm vgchange -aln --ignorelockingfailure
46 killproc clvmd || true
47 killproc ccsd || true
48 fence_tool leave || true
49 sleep 3
50 cman_tool leave remove
51 rm -f /var/lock/subsys/cman
52 echo
53 ;;
54
55 status)
56 cat /proc/cluster/status
57 ;;
58 *)
59 echo "Usage cluster {start|stop|status}"
60 exit 1;
61 ;;
62esac
63
64exit 0
This page took 0.102719 seconds and 4 git commands to generate.