summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Zoffoli <xmerlin@gentoo.org>2008-03-17 16:47:11 +0000
committerChristian Zoffoli <xmerlin@gentoo.org>2008-03-17 16:47:11 +0000
commit06d173d744572579fb58defb21ba76971ea7bfa4 (patch)
tree909f409e49ae34e4dfb5fb55d3142e647d7ba859 /sys-cluster/cman
parentAdd init.d/conf.d scripts for 3.1.5. (diff)
downloadhistorical-06d173d744572579fb58defb21ba76971ea7bfa4.tar.gz
historical-06d173d744572579fb58defb21ba76971ea7bfa4.tar.bz2
historical-06d173d744572579fb58defb21ba76971ea7bfa4.zip
Version bump. 1.0x.00 is scheduled to be removed soon.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'sys-cluster/cman')
-rw-r--r--sys-cluster/cman/ChangeLog14
-rw-r--r--sys-cluster/cman/cman-1.02.00-r1.ebuild14
-rw-r--r--sys-cluster/cman/cman-1.03.00.ebuild18
-rw-r--r--sys-cluster/cman/cman-1.04.00.ebuild18
-rw-r--r--sys-cluster/cman/cman-2.02.00.ebuild95
-rw-r--r--sys-cluster/cman/files/cman-1.0x.conf (renamed from sys-cluster/cman/files/cman.conf)0
-rwxr-xr-xsys-cluster/cman/files/cman-1.0x.rc (renamed from sys-cluster/cman/files/cman.rc)2
-rw-r--r--sys-cluster/cman/files/cman-2.02.00-include.patch20
-rw-r--r--sys-cluster/cman/files/cman-2.x.conf30
-rwxr-xr-xsys-cluster/cman/files/cman-2.x.rc286
-rwxr-xr-xsys-cluster/cman/files/qdiskd-1.0x.rc (renamed from sys-cluster/cman/files/qdiskd.rc)2
-rwxr-xr-xsys-cluster/cman/files/qdiskd-2.0x.rc23
12 files changed, 493 insertions, 29 deletions
diff --git a/sys-cluster/cman/ChangeLog b/sys-cluster/cman/ChangeLog
index a782e90e7aab..4697018cbc81 100644
--- a/sys-cluster/cman/ChangeLog
+++ b/sys-cluster/cman/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sys-cluster/cman
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/ChangeLog,v 1.36 2007/10/15 14:56:13 corsair Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/ChangeLog,v 1.37 2008/03/17 16:47:10 xmerlin Exp $
+
+*cman-2.02.00 (17 Mar 2008)
+
+ 17 Mar 2008; Christian Zoffoli <xmerlin@gentoo.org> +files/cman-1.0x.conf,
+ +files/cman-1.0x.rc, +files/qdiskd-1.0x.rc, +files/qdiskd-2.0x.rc,
+ +files/cman-2.02.00-include.patch, +files/cman-2.x.conf,
+ +files/cman-2.x.rc, -files/cman.conf, -files/cman.rc, -files/qdiskd.rc,
+ cman-1.02.00-r1.ebuild, cman-1.03.00.ebuild, cman-1.04.00.ebuild,
+ +cman-2.02.00.ebuild:
+ Version bump. 1.0x.00 is scheduled to be removed soon.
15 Oct 2007; Markus Rothe <corsair@gentoo.org> cman-1.03.00.ebuild:
Stable on ppc64
diff --git a/sys-cluster/cman/cman-1.02.00-r1.ebuild b/sys-cluster/cman/cman-1.02.00-r1.ebuild
index 23ed11eb398e..2f025bc06153 100644
--- a/sys-cluster/cman/cman-1.02.00-r1.ebuild
+++ b/sys-cluster/cman/cman-1.02.00-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-1.02.00-r1.ebuild,v 1.5 2007/03/09 11:01:30 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-1.02.00-r1.ebuild,v 1.6 2008/03/17 16:47:10 xmerlin Exp $
inherit eutils
@@ -28,8 +28,8 @@ S="${WORKDIR}/${MY_P}/${PN}"
src_unpack() {
unpack ${A}
- cd ${S}
- epatch ${WORKDIR}/${PN}-${PV}-${CVS_RELEASE}-cvs.patch || die
+ cd "${S}"
+ epatch "${WORKDIR}"/${PN}-${PV}-${CVS_RELEASE}-cvs.patch || die
}
src_compile() {
@@ -38,10 +38,10 @@ src_compile() {
}
src_install() {
- emake DESTDIR=${D} install || die "install problem"
+ emake DESTDIR="${D}" install || die "install problem"
- newinitd ${FILESDIR}/${PN}.rc ${PN} || die
- newconfd ${FILESDIR}/${PN}.conf ${PN} || die
+ newinitd "${FILESDIR}"/${PN}-1.0x.rc ${PN} || die
+ newconfd "${FILESDIR}"/${PN}-1.0x.conf ${PN} || die
keepdir /etc/cluster || die
}
diff --git a/sys-cluster/cman/cman-1.03.00.ebuild b/sys-cluster/cman/cman-1.03.00.ebuild
index c3937dbba708..b66b6981f765 100644
--- a/sys-cluster/cman/cman-1.03.00.ebuild
+++ b/sys-cluster/cman/cman-1.03.00.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-1.03.00.ebuild,v 1.7 2007/10/15 14:56:13 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-1.03.00.ebuild,v 1.8 2008/03/17 16:47:10 xmerlin Exp $
inherit eutils
@@ -25,9 +25,9 @@ S="${WORKDIR}/${MY_P}/${PN}"
src_unpack() {
unpack ${A}
- cd ${S}
- epatch ${FILESDIR}/${PN}-1.03.00-compile-hack.patch || die
- epatch ${FILESDIR}/${PN}-1.03.00-qdisk-makefile.patch || die
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-1.03.00-compile-hack.patch || die
+ epatch "${FILESDIR}"/${PN}-1.03.00-qdisk-makefile.patch || die
}
src_compile() {
@@ -36,12 +36,12 @@ src_compile() {
}
src_install() {
- emake DESTDIR=${D} install || die "install problem"
+ emake DESTDIR="${D}" install || die "install problem"
- newinitd ${FILESDIR}/${PN}.rc ${PN} || die
- newconfd ${FILESDIR}/${PN}.conf ${PN} || die
+ newinitd "${FILESDIR}"/${PN}-1.0x.rc ${PN} || die
+ newconfd "${FILESDIR}"/${PN}-1.0x.conf ${PN} || die
- newinitd ${FILESDIR}/qdiskd.rc qdiskd || die
+ newinitd "${FILESDIR}"/qdiskd-1.0x.rc qdiskd || die
keepdir /etc/cluster || die
}
diff --git a/sys-cluster/cman/cman-1.04.00.ebuild b/sys-cluster/cman/cman-1.04.00.ebuild
index 7220e0bc3e1d..c80c92c430be 100644
--- a/sys-cluster/cman/cman-1.04.00.ebuild
+++ b/sys-cluster/cman/cman-1.04.00.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-1.04.00.ebuild,v 1.5 2007/07/14 22:18:04 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-1.04.00.ebuild,v 1.6 2008/03/17 16:47:10 xmerlin Exp $
inherit eutils
@@ -25,9 +25,9 @@ S="${WORKDIR}/${MY_P}/${PN}"
src_unpack() {
unpack ${A}
- cd ${S}
- epatch ${FILESDIR}/cman-1.03.00-compile-hack.patch || die
- epatch ${FILESDIR}/${P}-qdisk-makefile.patch || die
+ cd "${S}"
+ epatch "${FILESDIR}"/cman-1.03.00-compile-hack.patch || die
+ epatch "${FILESDIR}"/${P}-qdisk-makefile.patch || die
}
src_compile() {
@@ -36,12 +36,12 @@ src_compile() {
}
src_install() {
- emake DESTDIR=${D} install || die "install problem"
+ emake DESTDIR="${D}" install || die "install problem"
- newinitd ${FILESDIR}/${PN}.rc ${PN} || die
- newconfd ${FILESDIR}/${PN}.conf ${PN} || die
+ newinitd "${FILESDIR}"/${PN}-1.0x.rc ${PN} || die
+ newconfd "${FILESDIR}"/${PN}-1.0x.conf ${PN} || die
- newinitd ${FILESDIR}/qdiskd.rc qdiskd || die
+ newinitd "${FILESDIR}"/qdiskd-1.0x.rc qdiskd || die
keepdir /etc/cluster || die
}
diff --git a/sys-cluster/cman/cman-2.02.00.ebuild b/sys-cluster/cman/cman-2.02.00.ebuild
new file mode 100644
index 000000000000..88d3b8a4f9a1
--- /dev/null
+++ b/sys-cluster/cman/cman-2.02.00.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-2.02.00.ebuild,v 1.1 2008/03/17 16:47:10 xmerlin Exp $
+
+inherit eutils versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)"
+
+DESCRIPTION="general-purpose symmetric cluster manager"
+HOMEPAGE="http://sources.redhat.com/cluster/"
+SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=sys-kernel/linux-headers-2.6.23
+ =sys-cluster/openais-0.82*
+ =sys-cluster/ccs-${CLUSTER_RELEASE}*
+ =sys-cluster/cman-lib-${CLUSTER_RELEASE}*
+ !sys-cluster/cman-headers
+ !sys-cluster/cman-kernel
+ !sys-cluster/dlm-headers
+ !sys-cluster/magma
+ !sys-cluster/magma-plugins
+ "
+
+RDEPEND="${DEPEND}"
+
+PDEPEND="=sys-cluster/dlm-${CLUSTER_RELEASE}*
+ =sys-cluster/fence-${CLUSTER_RELEASE}*"
+
+S="${WORKDIR}/${MY_P}/${PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # fix the manual pages have executable bit
+ sed -i -e '
+ /\tinstall -d/s/install/& -m 0755/; t
+ /\tinstall/s/install/& -m 0644/' \
+ man/Makefile || die "failed patching man pages permission"
+
+ epatch "${FILESDIR}"/${P}-include.patch || die
+}
+
+src_compile() {
+ (cd "${WORKDIR}"/${MY_P};
+ ./configure \
+ --cc=$(tc-getCC) \
+ --cflags="-Wall" \
+ --disable_kernel_check \
+ --release_major="$MAJ_PV" \
+ --release_minor="$MIN_PV" \
+ --cmanlibdir=/usr/lib \
+ --cmanincdir=/usr/include \
+ ) || die "configure problem"
+
+ emake clean
+ emake -C cman_tool || die "compile problem"
+ emake -C daemon || die "compile problem"
+ env -u CFLAGS emake -C qdisk || die "compile problem"
+ emake -C init.d || die "compile problem"
+ emake -C man || die "compile problem"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install problem"
+
+ # These were installed by cman-lib.
+ rm "${D}"/usr/lib/libcman.so.${PV} \
+ "${D}"/usr/lib/libcman.a \
+ "${D}"/usr/include/libcman.h \
+ "${D}"/usr/lib/libcman.so.2 \
+ "${D}"/usr/lib/libcman.so \
+ || die "failed to cleanup extra files"
+
+ newinitd "${FILESDIR}"/${PN}-2.0x.rc ${PN} || die
+ newconfd "${FILESDIR}"/${PN}-2.0x.conf ${PN} || die
+ newinitd "${FILESDIR}"/qdiskd-2.0x.rc qdiskd || die
+
+ keepdir /etc/cluster || die
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "Please add a cluster.conf in /etc/cluster/"
+ einfo ""
+}
diff --git a/sys-cluster/cman/files/cman.conf b/sys-cluster/cman/files/cman-1.0x.conf
index 6d967ccbb5d1..6d967ccbb5d1 100644
--- a/sys-cluster/cman/files/cman.conf
+++ b/sys-cluster/cman/files/cman-1.0x.conf
diff --git a/sys-cluster/cman/files/cman.rc b/sys-cluster/cman/files/cman-1.0x.rc
index 7e3dc84ab805..0b765c217879 100755
--- a/sys-cluster/cman/files/cman.rc
+++ b/sys-cluster/cman/files/cman-1.0x.rc
@@ -1,7 +1,7 @@
#!/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.6 2005/03/25 16:15:21 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/files/cman-1.0x.rc,v 1.1 2008/03/17 16:47:11 xmerlin Exp $
depend() {
use net
diff --git a/sys-cluster/cman/files/cman-2.02.00-include.patch b/sys-cluster/cman/files/cman-2.02.00-include.patch
new file mode 100644
index 000000000000..9dc8de388904
--- /dev/null
+++ b/sys-cluster/cman/files/cman-2.02.00-include.patch
@@ -0,0 +1,20 @@
+--- cluster-2.02.00/cman/lib/Makefile.orig 2008-02-26 15:37:43.000000000 +0000
++++ cluster-2.02.00/cman/lib/Makefile 2008-03-16 15:08:59.000000000 +0000
+@@ -13,6 +13,8 @@
+
+ TARGET= libcman
+
++include ../../make/defines.mk
++
+ LIBDIRT=$(TARGET).a \
+ $(TARGET).so.$(RELEASE_MAJOR).$(RELEASE_MINOR)
+
+@@ -21,8 +23,6 @@
+
+ INCDIRT=$(TARGET).h
+
+-include ../../make/defines.mk
+-
+ SHAREDLIB=$(TARGET).so.${RELEASE_MAJOR}.${RELEASE_MINOR}
+ STATICLIB=$(TARGET).a
+
diff --git a/sys-cluster/cman/files/cman-2.x.conf b/sys-cluster/cman/files/cman-2.x.conf
new file mode 100644
index 000000000000..42e4884f4f27
--- /dev/null
+++ b/sys-cluster/cman/files/cman-2.x.conf
@@ -0,0 +1,30 @@
+CCSD_OPTS=
+
+# 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 ...."
+
+# CMAN_LEAVE_OPTIONS
+#CMAN_LEAVE_OPTS=""
+
+
+# ex: FENCED_OPTS="-w -t 300"
+FENCED_OPTS=""
diff --git a/sys-cluster/cman/files/cman-2.x.rc b/sys-cluster/cman/files/cman-2.x.rc
new file mode 100755
index 000000000000..57a793e6e83e
--- /dev/null
+++ b/sys-cluster/cman/files/cman-2.x.rc
@@ -0,0 +1,286 @@
+#!/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-2.x.rc,v 1.1 2008/03/17 16:47:11 xmerlin Exp $
+
+CCSD_BIN="/usr/sbin/ccsd"
+
+[ -z "$CCSD_OPTS" ] && CCSD_OPTS=""
+[ -z "$CMAN_CLUSTER_TIMEOUT" ] && CMAN_CLUSTER_TIMEOUT=120
+[ -z "$CMAN_QUORUM_TIMEOUT" ] && CMAN_QUORUM_TIMEOUT=0
+[ -z "$CMAN_SHUTDOWN_TIMEOUT" ] && CMAN_SHUTDOWN_TIMEOUT=60
+[ -z "$FENCED_START_TIMEOUT" ] && FENCED_START_TIMEOUT=300
+
+depend() {
+ use net
+ after xend
+ after xendomains
+}
+
+load_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Loading ${module} kernel module"
+ modprobe ${module} > /dev/null
+ eend $? "Failed to load ${module} kernel module"
+ done
+}
+
+unload_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Unloading ${module} kernel module"
+ modprobe -r ${module} > /dev/null
+ eend $? "Failed to unload ${module} kernel module"
+ done
+}
+
+check_configfs() {
+ awk '{ print $2 }' /etc/mtab | grep "/sys/kernel/config" &> /dev/null\
+ && awk '{ print $3 }' /etc/mtab | grep "configfs" &> /dev/null
+
+ if [ $? -ne 0 ]; then
+ ewarn "Please add the following line to /etc/fstab:"
+ ewarn "none configfs /sys/kernel/config defaults 0 0"
+ eend 1 "configfs not mounted at /sys/kernel/config"
+ fi
+}
+
+mount_configfs()
+{
+ local module=$(awk '$2 == "configfs" { print $2 }' /proc/filesystems)
+
+ if [ -z "${module}" ]; then
+ load_modules "configfs"
+ sleep 1s
+ fi
+
+ # configfs
+ awk '{ print $2 }' /etc/mtab | grep "/sys/kernel/config" &> /dev/null \
+ && awk '{ print $3 }' /etc/mtab | grep "configfs" &> /dev/null
+
+ if [ $? -ne 0 ]
+ then
+ ebegin "Mounting ConfigFS"
+ /bin/mount -t configfs none /sys/kernel/config 2>&1
+ eend $?
+ fi
+ return 0
+}
+
+umount_configfs() {
+ local sig retry
+ local entry entries
+
+ entries="$(awk '$3 == "configfs" { print $2 }' /proc/mounts | sort -r)"
+
+ for entry in $entries; do
+ ebegin "Unmounting ConfigFS"
+ umount $entry &>/dev/null
+ eend $?
+ done
+
+ local module=$(awk '$1 == "configfs" { print $1 }' /proc/modules)
+
+ if [ ! -z "${module}" ]; then
+ unload_modules "configfs"
+ sleep 1s
+ fi
+}
+
+umount_gfs_filesystems() {
+ local sig retry
+ local remaining="$(awk '$3 == "gfs" || $3 == "gfs2" { print $2 }' /proc/mounts | sort -r)"
+
+ if [ -n "${remaining}" ]
+ then
+ sig=
+ retry=3
+ while [ -n "${remaining}" -a "${retry}" -gt 0 ]
+ do
+ if [ "${retry}" -lt 3 ]
+ then
+ ebegin "Unmounting GFS filesystems (retry)"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems this retry"
+ else
+ ebegin "Unmounting GFS filesystems"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems"
+ fi
+ remaining="$(awk '$3 == "gfs" || $3 == "gfs2" { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
+ [ -z "${remaining}" ] && break
+ /bin/fuser -k -m ${sig} ${remaining} &>/dev/null
+ sleep 5
+ retry=$((${retry} -1))
+ sig=-9
+ done
+ fi
+}
+
+unload_allmodules() {
+ local modules
+
+ modules=$(awk '$1 == "lock_gulm" || \
+ $1 == "lock_dlm" || $1 == "dlm" || \
+ $1 == "lock_harness" || $1 == "gfs2" || \
+ $1 == "gfs" { print $1 }' /proc/modules)
+
+ unload_modules "${modules}"
+}
+
+start_ccsd() {
+ ebegin "Starting ccsd"
+ start-stop-daemon --start --quiet \
+ --exec ${CCSD_BIN} -- ${CCSD_OPTS}
+ eend $?
+}
+
+stop_ccsd() {
+ ebegin "Stopping ccsd"
+ start-stop-daemon --stop --quiet \
+ -s 9 --exec ${CCSD_BIN}
+ eend $?
+}
+
+start_cman() {
+
+ /usr/sbin/cman_tool status &> /dev/null
+ if [ $? -ne 0 ]
+ then
+ ebegin "Starting cman"
+ /usr/sbin/cman_tool -t ${CMAN_CLUSTER_TIMEOUT} \
+ -w join ${CMAN_JOIN_OPTS} > /dev/null
+
+ if [ "$?" -ne 0 ]
+ then
+ eend 1 "Failed to start cman"
+ else
+ eend 0
+
+ # make sure that we are quorate?
+ if [ ${CMAN_QUORUM_TIMEOUT} -gt 0 ]
+ then
+ ebegin "Waiting for quorum (${CMAN_QUORUM_TIMEOUT} secs)"
+ /usr/sbin/cman_tool -t ${CMAN_QUORUM_TIMEOUT} -q wait
+ eend $?
+ fi
+ fi
+ else
+ einfo "cman already running"
+ fi
+}
+
+stop_cman() {
+ ebegin "Stopping cman"
+ local stat=0
+ /usr/sbin/cman_tool status > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ retry=3
+ stat=1
+ while [ "${stat}" -eq 1 -a "${retry}" -gt 0 ]
+ do
+ /usr/sbin/cman_tool -w -t ${CMAN_SHUTDOWN_TIMEOUT} \
+ leave ${CMAN_LEAVE_OPTS} > /dev/null
+
+ stat=$?
+ retry=$((${retry} -1))
+ done
+ fi
+
+ eend ${stat}
+}
+
+start_groupd() {
+ ebegin "Starting groupd"
+ start-stop-daemon --start --exec /usr/sbin/groupd --name groupd
+ eend $?
+}
+
+stop_groupd() {
+ ebegin "Stopping groupd"
+ start-stop-daemon --stop --exec /usr/sbin/groupd --name groupd
+ eend $?
+}
+
+start_fenced() {
+ ebegin "Starting fenced"
+ start-stop-daemon --start --exec /usr/sbin/fenced --name fenced
+ eend $?
+
+ ebegin "Joining fence domain"
+ /usr/sbin/fence_tool join ${FENCED_OPTS}> /dev/null 2>&1
+ eend $?
+}
+
+stop_fenced() {
+ # fenced services
+ local fence_status="$(cman_tool services | awk '$1 ~ /fence/ { print $3 }')"
+ if [ -n "${fence_status}" ]; then
+ if [ -x /usr/sbin/fence_tool ]; then
+ ebegin "Leaving fence domain"
+ /usr/sbin/fence_tool leave > /dev/null 2>&1
+ eend $?
+ fi
+ fi
+
+ ebegin "Stopping fenced"
+ start-stop-daemon --stop --exec /usr/sbin/fenced --name fenced
+ eend $?
+}
+
+start_gfs_controld() {
+ ebegin "Starting gfs_controld"
+ start-stop-daemon --start --exec /usr/sbin/gfs_controld --name gfs_controld
+ eend $?
+}
+
+stop_gfs_controld() {
+ ebegin "Stopping gfs_controld"
+ start-stop-daemon --stop --exec /usr/sbin/gfs_controld --name gfs_controld
+ eend $?
+}
+
+start_dlm_controld() {
+ ebegin "Starting dlm_controld"
+ start-stop-daemon --start --exec /usr/sbin/dlm_controld --name dlm_controld
+ eend $?
+}
+
+stop_dlm_controld() {
+ ebegin "Stopping dlm_controld"
+ start-stop-daemon --stop --exec /usr/sbin/dlm_controld --name dlm_controld
+ eend $?
+}
+
+start() {
+ load_modules "dlm lock_dlm"
+
+ mount_configfs
+ start_ccsd
+ start_cman
+ start_groupd
+ start_fenced
+ start_dlm_controld
+ start_gfs_controld
+}
+
+stop() {
+ # umount GFS filesystems
+ umount_gfs_filesystems
+
+ stop_fenced
+ stop_cman
+
+ stop_gfs_controld
+ stop_dlm_controld
+ stop_groupd
+
+ stop_ccsd
+ umount_configfs
+ unload_allmodules
+}
diff --git a/sys-cluster/cman/files/qdiskd.rc b/sys-cluster/cman/files/qdiskd-1.0x.rc
index 8fd777bc790f..ed3e24c4cf35 100755
--- a/sys-cluster/cman/files/qdiskd.rc
+++ b/sys-cluster/cman/files/qdiskd-1.0x.rc
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/files/qdiskd.rc,v 1.1 2007/03/09 16:26:14 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/files/qdiskd-1.0x.rc,v 1.1 2008/03/17 16:47:11 xmerlin Exp $
depend() {
use net
diff --git a/sys-cluster/cman/files/qdiskd-2.0x.rc b/sys-cluster/cman/files/qdiskd-2.0x.rc
new file mode 100755
index 000000000000..4045862b75fb
--- /dev/null
+++ b/sys-cluster/cman/files/qdiskd-2.0x.rc
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/files/qdiskd-2.0x.rc,v 1.1 2008/03/17 16:47:11 xmerlin Exp $
+
+depend() {
+ use net
+ need cman
+}
+
+start() {
+ ebegin "Starting the Quorum Disk Daemon"
+ start-stop-daemon --start --quiet --exec /sbin/qdiskd -- -Q
+ eend $? "Failed to start qdiskd"
+}
+
+stop() {
+ ebegin "Stopping the Quorum Disk Daemon"
+
+ start-stop-daemon --stop --pidfile /var/run/qdiskd.pid
+ eend $? "Failed to stop qdiskd"
+}
+