summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Zoffoli <xmerlin@gentoo.org>2005-03-25 16:15:21 +0000
committerChristian Zoffoli <xmerlin@gentoo.org>2005-03-25 16:15:21 +0000
commitc65878bc76c3276a8fd8c67d8f3c30227fa5f4db (patch)
treee6c09df961875accd7e65dc125393ad10ac20da1 /sys-cluster/cman
parentstable on amd64 (diff)
downloadhistorical-c65878bc76c3276a8fd8c67d8f3c30227fa5f4db.tar.gz
historical-c65878bc76c3276a8fd8c67d8f3c30227fa5f4db.tar.bz2
historical-c65878bc76c3276a8fd8c67d8f3c30227fa5f4db.zip
ebuild / init script cleaned up
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'sys-cluster/cman')
-rw-r--r--sys-cluster/cman/ChangeLog6
-rw-r--r--sys-cluster/cman/Manifest12
-rw-r--r--sys-cluster/cman/cman-1.0_pre31.ebuild8
-rwxr-xr-xsys-cluster/cman/files/cman.rc45
4 files changed, 37 insertions, 34 deletions
diff --git a/sys-cluster/cman/ChangeLog b/sys-cluster/cman/ChangeLog
index 68bdcc658dad..92c2f3c8c254 100644
--- a/sys-cluster/cman/ChangeLog
+++ b/sys-cluster/cman/ChangeLog
@@ -1,6 +1,10 @@
# 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.12 2005/03/25 02:11:08 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/ChangeLog,v 1.13 2005/03/25 16:15:21 xmerlin Exp $
+
+ 25 Mar 2005; Christian Zoffoli <xmerlin@gentoo.org> files/cman.rc,
+ cman-1.0_pre31.ebuild:
+ ebuild / init script cleaned up
25 Mar 2005; Christian Zoffoli <xmerlin@gentoo.org> files/cman.rc:
improved init script
diff --git a/sys-cluster/cman/Manifest b/sys-cluster/cman/Manifest
index f4725797a341..7070da3bf4a4 100644
--- a/sys-cluster/cman/Manifest
+++ b/sys-cluster/cman/Manifest
@@ -2,17 +2,17 @@
Hash: SHA1
MD5 a3f82d542d77974694ba72cc54931146 cman-1.0_pre3.ebuild 787
-MD5 44d0cd9778a85fa13538e598104c1278 ChangeLog 1228
+MD5 77b92371e48db93f22356c5131305417 ChangeLog 1357
MD5 a64b9a1937a5cfc2fbaf373521f65d47 metadata.xml 223
-MD5 c89f4444841136fecacd5764adc5095a cman-1.0_pre31.ebuild 926
+MD5 326c96d4456cdd1cffbd0d3d13f81fce cman-1.0_pre31.ebuild 819
MD5 1b66cd669f2348b1e7cdb8f057be395a files/digest-cman-1.0_pre3 64
MD5 0b1d2c6bdf0d0def6a2bdceb6d204832 files/digest-cman-1.0_pre31 65
MD5 b10ff12664efd9eae78d46c0e57b1ddf files/cman.conf 1009
-MD5 0c157d988b08df68a2b1cebff50df29c files/cman.rc 3962
+MD5 d7ed316a058c2c07f82ef3fdcfbb73e6 files/cman.rc 3960
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
-iD8DBQFCQ3NIgMUyd/cdjWsRAvoSAJ9VmWUuJeTQWY2hOqmYMSKL+Ocy+QCfY18I
-qJoHYbR/vomJKk0bg+nYyV4=
-=wQDI
+iD8DBQFCRDsVgMUyd/cdjWsRAilsAJ9u/Xfdev2ZkIovdr5L4t4lV04jbwCZAcxD
+BzaZjJT610fuvLncl+zmLbc=
+=CT11
-----END PGP SIGNATURE-----
diff --git a/sys-cluster/cman/cman-1.0_pre31.ebuild b/sys-cluster/cman/cman-1.0_pre31.ebuild
index 69bc5afb0b5d..301e57212bec 100644
--- a/sys-cluster/cman/cman-1.0_pre31.ebuild
+++ b/sys-cluster/cman/cman-1.0_pre31.ebuild
@@ -1,13 +1,12 @@
# 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.3 2005/03/23 02:37:10 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-1.0_pre31.ebuild,v 1.4 2005/03/25 16:15:21 xmerlin Exp $
MY_PV="${PV/_/-}"
MY_P="${PN}-${MY_PV}"
DESCRIPTION="general-purpose symmetric cluster manager"
HOMEPAGE="http://sources.redhat.com/cluster/"
-#SRC_URI="http://people.redhat.com/cfeist/cluster/tgz/${MY_P}.tar.gz"
SRC_URI="mirror://gentoo/${MY_P}.tar.gz
http://dev.gentoo.org/~xmerlin/gfs/${MY_P}.tar.gz"
@@ -22,7 +21,6 @@ DEPEND=">=sys-cluster/ccs-0.24
RDEPEND="virtual/libc"
-
S="${WORKDIR}/${MY_P}"
src_compile() {
@@ -33,6 +31,6 @@ 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
+ newinitd ${FILESDIR}/${PN}.rc ${PN} || die
+ newconfd ${FILESDIR}/${PN}.conf ${PN} || die
}
diff --git a/sys-cluster/cman/files/cman.rc b/sys-cluster/cman/files/cman.rc
index f9e9f39bbbad..7e3dc84ab805 100755
--- a/sys-cluster/cman/files/cman.rc
+++ b/sys-cluster/cman/files/cman.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.5 2005/03/25 02:11:08 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/files/cman.rc,v 1.6 2005/03/25 16:15:21 xmerlin Exp $
depend() {
use net
@@ -11,7 +11,7 @@ depend() {
umount_gfs_filesystems() {
local sig retry
- local remaining="$(awk '$3 ~ /gfs/ { print $2 }' /proc/mounts | sort -r)"
+ local remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
if [ -n "${remaining}" ]
then
@@ -29,7 +29,7 @@ umount_gfs_filesystems() {
umount ${remaining} &>/dev/null
eend $? "Failed to unmount GFS filesystems"
fi
- remaining="$(awk '$3 ~ /gfs/ { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
+ remaining="$(awk '$3 == "gfs" { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
[ -z "${remaining}" ] && break
/bin/fuser -k -m ${sig} ${remaining} &>/dev/null
sleep 5
@@ -39,6 +39,7 @@ umount_gfs_filesystems() {
fi
}
+
load_modules() {
local module modules
modules=$1
@@ -76,10 +77,10 @@ unload_gfs_modules() {
start() {
- if grep -qE "<[[:space:]]*gulm([[:space:]]|[>]|$)" /etc/cluster/cluster.conf
- then
- die "<gulm> section detected in /etc/cluster/cluster.conf"
- fi
+ #if grep -qE "<[[:space:]]*gulm([[:space:]]|[>]|$)" /etc/cluster/cluster.conf
+ #then
+ # die "<gulm> section detected in /etc/cluster/cluster.conf"
+ #fi
if [ ! -d /proc/cluster/config/cman ]; then
load_modules cman
@@ -98,7 +99,9 @@ start() {
# make sure that we are quorate?
if [ ${CMAN_QUORUM_TIMEOUT} -gt 0 ]
then
+ ebegin "Waiting for quorum (${CMAN_QUORUM_TIMEOUT} secs)"
/sbin/cman_tool -t ${CMAN_QUORUM_TIMEOUT} -q wait
+ eend $?
fi
fi
}
@@ -128,7 +131,7 @@ stop() {
cman_status="$(cman_tool status | awk '$1 ~ /Membership/ { print $3 }')"
if [ "${cman_status}" != "Not-in-Cluster" -a -d /proc/cluster/config/cman ]; then
- retry=2
+ retry=3
stat=1
while [ "${stat}" -eq 1 -a "${retry}" -gt 0 ]
do
@@ -150,21 +153,19 @@ stop() {
# eend 0
#fi
else
- eend 0
+ stat=0
fi
- eend $?
-
- sleep 1s
-
- local module="cman"
- ebegin "Unloading ${module} kernel module"
- modprobe -r ${module} &> /dev/null || return 0
- if [ "$?" -ne 0 ]
- then
- ewend 1 "Failed to unload ${module} kernel module"
- else
- eend 0
+
+ eend ${stat}
+
+ if [ "${stat}" -eq 0 ]; then
+ sleep 1s
+
+ #ebegin "Unloading cman kernel module"
+ #modprobe -r cman &> /dev/null || return 0
+ #eend $?
+
+ unload_modules cman
fi
- #unload_modules cman || return 0
}