summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Zoffoli <xmerlin@gentoo.org>2005-03-19 21:36:45 +0000
committerChristian Zoffoli <xmerlin@gentoo.org>2005-03-19 21:36:45 +0000
commit25806e02a9e8b61376a99ece0ac13b14b77f2c53 (patch)
tree6061a082dcb83d7f66ae66f692fe052ed55945c4 /sys-cluster/cman
parentAdded ghc-6.4 block. Added test phase for darcs-1.0.2. (diff)
downloadhistorical-25806e02a9e8b61376a99ece0ac13b14b77f2c53.tar.gz
historical-25806e02a9e8b61376a99ece0ac13b14b77f2c53.tar.bz2
historical-25806e02a9e8b61376a99ece0ac13b14b77f2c53.zip
added gentoo compliant init/conf
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'sys-cluster/cman')
-rw-r--r--sys-cluster/cman/ChangeLog9
-rw-r--r--sys-cluster/cman/Manifest12
-rw-r--r--sys-cluster/cman/cman-1.0_pre31.ebuild5
-rw-r--r--sys-cluster/cman/files/cman.conf21
-rwxr-xr-xsys-cluster/cman/files/cman.rc55
5 files changed, 95 insertions, 7 deletions
diff --git a/sys-cluster/cman/ChangeLog b/sys-cluster/cman/ChangeLog
index 060a8bcc0e53..578fc6783272 100644
--- a/sys-cluster/cman/ChangeLog
+++ b/sys-cluster/cman/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-cluster/cman
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/ChangeLog,v 1.7 2005/03/19 16:06:24 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/ChangeLog,v 1.8 2005/03/19 21:36:45 xmerlin Exp $
+
+ 19 Mar 2005; Christian Zoffoli <xmerlin@gentoo.org> +files/cman.conf,
+ +files/cman.rc, cman-1.0_pre31.ebuild:
+ added gentoo compliant init/conf
+
+ 19 Mar 2005; Christian Zoffoli <xmerlin@gentoo.org> cman-1.0_pre31.ebuild:
+ added gentoo compliant init script
*cman-1.0_pre31 (19 Mar 2005)
diff --git a/sys-cluster/cman/Manifest b/sys-cluster/cman/Manifest
index f8ac616fe1f6..8918c7278ba8 100644
--- a/sys-cluster/cman/Manifest
+++ b/sys-cluster/cman/Manifest
@@ -2,15 +2,17 @@
Hash: SHA1
MD5 a3f82d542d77974694ba72cc54931146 cman-1.0_pre3.ebuild 787
-MD5 87a3153b4017f257f21f101532b52a3d ChangeLog 665
+MD5 8ae031dabfde061ad2b0c0dd7c2eba4a ChangeLog 929
MD5 a64b9a1937a5cfc2fbaf373521f65d47 metadata.xml 223
-MD5 504052a4ca8b6a4ec1d67bd569077d54 cman-1.0_pre31.ebuild 876
+MD5 ae358a4322e44f5fea139ef53e84b98f cman-1.0_pre31.ebuild 1003
MD5 1b66cd669f2348b1e7cdb8f057be395a files/digest-cman-1.0_pre3 64
MD5 0b1d2c6bdf0d0def6a2bdceb6d204832 files/digest-cman-1.0_pre31 65
+MD5 8172a95e3d5f28c037bf19d8da0ce449 files/cman.conf 966
+MD5 d1dd1b5881c2647896041a6c76c37951 files/cman.rc 1117
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
-iD8DBQFCPE7MgMUyd/cdjWsRAg3TAKCBzbo4gKCBJi+VnyEvN0sRl5DleQCgg68/
-qBAjjh8lG9Flkm5iRMwSKGo=
-=OyQW
+iD8DBQFCPJwdgMUyd/cdjWsRAjeHAJ981DaKsbWiGQl497/3mkgHcroZuwCdErBV
+DexflHHcQleAuAtjXp5LQps=
+=xWHv
-----END PGP SIGNATURE-----
diff --git a/sys-cluster/cman/cman-1.0_pre31.ebuild b/sys-cluster/cman/cman-1.0_pre31.ebuild
index 9ac3bd6514e9..4cb71773eb1f 100644
--- a/sys-cluster/cman/cman-1.0_pre31.ebuild
+++ b/sys-cluster/cman/cman-1.0_pre31.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-1.0_pre31.ebuild,v 1.1 2005/03/19 16:06:24 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-1.0_pre31.ebuild,v 1.2 2005/03/19 21:36:45 xmerlin Exp $
inherit linux-mod
@@ -37,4 +37,7 @@ src_compile() {
src_install() {
make DESTDIR=${D} install || die
+
+ exeinto /etc/init.d ; newexe ${FILESDIR}/cman.rc cman || die
+ insinto /etc/conf.d ; newins ${FILESDIR}/cman.conf cman || die
}
diff --git a/sys-cluster/cman/files/cman.conf b/sys-cluster/cman/files/cman.conf
new file mode 100644
index 000000000000..0396b44ed899
--- /dev/null
+++ b/sys-cluster/cman/files/cman.conf
@@ -0,0 +1,21 @@
+# CMAN_CLUSTER_TIMEOUT -- amount of time to wait for joinging a cluster
+# before giving up. If CMAN_CLUSTER_TIMEOUT is positive, then we will
+# wait CMAN_CLUSTER_TIMEOUT seconds before giving up and failing when
+# a cluster is not joined. If CMAN_CLUSTER_TIMEOUT is zero, then
+# wait indefinately for a cluster join. If CMAN_CLUSTER_TIMEOUT is
+# negative, do not check to see that the cluster has been joined
+CMAN_CLUSTER_TIMEOUT=120
+
+# CMAN_QUORUM_TIMEOUT -- amount of time to wait for a quorate cluster on
+# startup quorum is needed by many other applications, so we may as
+# well wait here. If CMAN_QUORUM_TIMEOUT is less than 1, quorum will
+# be ignored.
+CMAN_QUORUM_TIMEOUT=300
+
+# CMAN_SHUTDOWN_TIMEOUT -- amount of time to wait for cman to become a
+# cluster member before calling cman_tool leave during shutdown.
+# default is 60 seconds
+CMAN_SHUTDOWN_TIMEOUT=60
+
+# CMAN_JOIN_OPTIONS
+#CMAN_JOIN_OPTS="-c ...."
diff --git a/sys-cluster/cman/files/cman.rc b/sys-cluster/cman/files/cman.rc
new file mode 100755
index 000000000000..8215f914ba00
--- /dev/null
+++ b/sys-cluster/cman/files/cman.rc
@@ -0,0 +1,55 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/files/cman.rc,v 1.1 2005/03/19 21:36:45 xmerlin Exp $
+
+depend() {
+ use net
+ before fence gfs
+ need ccsd
+ provide cman
+}
+
+exefile=/sbin/cman_tool
+pidfile=/var/run/cman.pid
+
+start() {
+ if grep -qE "<[[:space:]]*gulm([[:space:]]|[>]|$)" /etc/cluster/cluster.conf
+ then
+ die "<gulm> section detected in /etc/cluster/cluster.conf"
+ fi
+
+ ebegin "Loading cman module"
+ modprobe cman
+ eend $?
+
+ ebegin "Starting cman"
+ /sbin/cman_tool -t ${CMAN_CLUSTER_TIMEOUT} \
+ -w join ${CMAN_JOIN_OPTS}
+ eend $?
+
+ # make sure that we are quorate?
+ if [ ${CMAN_QUORUM_TIMEOUT} -gt 0 ]
+ then
+ /sbin/cman_tool -t ${CMAN_QUORUM_TIMEOUT} -q wait
+ fi
+
+ ebegin "Loading dlm module"
+ modprobe dlm
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cman"
+ /sbin/cman_tool -t ${CMAN_SHUTDOWN_TIMEOUT} -w leave > /dev/null
+ eend $?
+
+ ebegin "Removing dlm module"
+ modprobe -r dlm &>/dev/null
+ eend $?
+
+ ebegin "Removing cman module"
+ modprobe -r cman && rtrn=0
+ eend $?
+}
+