diff options
author | Christian Zoffoli <xmerlin@gentoo.org> | 2005-03-22 01:16:49 +0000 |
---|---|---|
committer | Christian Zoffoli <xmerlin@gentoo.org> | 2005-03-22 01:16:49 +0000 |
commit | f2379bdaa40ed077c16cfda59e090b9adb3fbf69 (patch) | |
tree | 96838f33e99ce8766e03d7c1da92f81daecb5799 /sys-cluster/cman | |
parent | version bump (diff) | |
download | historical-f2379bdaa40ed077c16cfda59e090b9adb3fbf69.tar.gz historical-f2379bdaa40ed077c16cfda59e090b9adb3fbf69.tar.bz2 historical-f2379bdaa40ed077c16cfda59e090b9adb3fbf69.zip |
improved init script
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'sys-cluster/cman')
-rw-r--r-- | sys-cluster/cman/ChangeLog | 6 | ||||
-rw-r--r-- | sys-cluster/cman/Manifest | 12 | ||||
-rw-r--r-- | sys-cluster/cman/files/cman.conf | 3 | ||||
-rwxr-xr-x | sys-cluster/cman/files/cman.rc | 56 |
4 files changed, 45 insertions, 32 deletions
diff --git a/sys-cluster/cman/ChangeLog b/sys-cluster/cman/ChangeLog index 578fc6783272..f23443d61719 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.8 2005/03/19 21:36:45 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/ChangeLog,v 1.9 2005/03/22 01:16:49 xmerlin Exp $ + + 22 Mar 2005; Christian Zoffoli <xmerlin@gentoo.org> files/cman.conf, + files/cman.rc: + improved init script 19 Mar 2005; Christian Zoffoli <xmerlin@gentoo.org> +files/cman.conf, +files/cman.rc, cman-1.0_pre31.ebuild: diff --git a/sys-cluster/cman/Manifest b/sys-cluster/cman/Manifest index be5c2ad1415a..20ab35c504e0 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 8ae031dabfde061ad2b0c0dd7c2eba4a ChangeLog 929 +MD5 e07e6428a5650ebee2f26190e304d139 ChangeLog 1041 MD5 a64b9a1937a5cfc2fbaf373521f65d47 metadata.xml 223 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 d75a1ece66bfa889b7d8bee5ce9506a6 files/cman.rc 1066 +MD5 af004037a6568eef1e2dcbfa46b1f48e files/cman.conf 1008 +MD5 70f4c5f88981d04ffeb47a191224afed files/cman.rc 1165 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) -iD8DBQFCPJ2cgMUyd/cdjWsRAn1HAJsFTv+m3lZ9j+TO/kOzjI3icVQcFgCeMOxB -BeXn+XoWKNtRwRTPdr2ENKM= -=85Xb +iD8DBQFCP3IKgMUyd/cdjWsRAr+VAJoDldLNFA0TxNAWM2M7QrxdNeddDQCfWR05 +04VcuT9WCvf9BSS7k8EgOAY= +=fab5 -----END PGP SIGNATURE----- diff --git a/sys-cluster/cman/files/cman.conf b/sys-cluster/cman/files/cman.conf index 0396b44ed899..aceeeeb07047 100644 --- a/sys-cluster/cman/files/cman.conf +++ b/sys-cluster/cman/files/cman.conf @@ -19,3 +19,6 @@ CMAN_SHUTDOWN_TIMEOUT=60 # CMAN_JOIN_OPTIONS #CMAN_JOIN_OPTS="-c ...." + +# CMAN_LEAVE_OPTIONS +#CMAN_LEAVE_OPTS="" diff --git a/sys-cluster/cman/files/cman.rc b/sys-cluster/cman/files/cman.rc index af6ff42c5a81..d6ab69a5ee39 100755 --- a/sys-cluster/cman/files/cman.rc +++ b/sys-cluster/cman/files/cman.rc @@ -1,13 +1,12 @@ #!/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.2 2005/03/19 21:43:15 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/files/cman.rc,v 1.3 2005/03/22 01:16:49 xmerlin Exp $ depend() { use net - before fence gfs - need ccsd - provide cman + need ccs + provide cluster-manager } start() { @@ -16,37 +15,44 @@ start() { die "<gulm> section detected in /etc/cluster/cluster.conf" fi - ebegin "Loading cman module" - modprobe cman - eend $? + if [ ! -d /proc/cluster/config/cman ]; then + ebegin "Loading cman module" + modprobe cman + eend $? + fi ebegin "Starting cman" /sbin/cman_tool -t ${CMAN_CLUSTER_TIMEOUT} \ - -w join ${CMAN_JOIN_OPTS} - eend $? + -w join ${CMAN_JOIN_OPTS} > /dev/null - # make sure that we are quorate? - if [ ${CMAN_QUORUM_TIMEOUT} -gt 0 ] + if [ "$?" -ne 0 ] then - /sbin/cman_tool -t ${CMAN_QUORUM_TIMEOUT} -q wait + ewend 1 "Failed to start cman" + else + eend 0 + + # make sure that we are quorate? + if [ ${CMAN_QUORUM_TIMEOUT} -gt 0 ] + then + /sbin/cman_tool -t ${CMAN_QUORUM_TIMEOUT} -q wait + fi 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 $? + /sbin/cman_tool -t ${CMAN_SHUTDOWN_TIMEOUT} \ + -w leave ${CMAN_LEAVE_OPTS} > /dev/null - ebegin "Removing cman module" - modprobe -r cman && rtrn=0 - eend $? + if [ "$?" -ne 0 ] + then + ewend 1 "Failed to stop cman" + else + eend 0 + ebegin "Unloading cman kernel module" + modprobe -r cman + eend $? + fi + } |