diff options
author | Christian Zoffoli <xmerlin@gentoo.org> | 2008-03-17 17:14:00 +0000 |
---|---|---|
committer | Christian Zoffoli <xmerlin@gentoo.org> | 2008-03-17 17:14:00 +0000 |
commit | 30e4e7c605019f68becc28e321f9be85ff3b21f4 (patch) | |
tree | 8b1ee1137bf3eeb18781d88a6a3bedaa59d99817 /sys-cluster/rgmanager/files | |
parent | Version bump. 1.0x.00 is scheduled to be removed soon. (diff) | |
download | historical-30e4e7c605019f68becc28e321f9be85ff3b21f4.tar.gz historical-30e4e7c605019f68becc28e321f9be85ff3b21f4.tar.bz2 historical-30e4e7c605019f68becc28e321f9be85ff3b21f4.zip |
Version bump. 1.0x.00 is scheduled to be removed soon.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'sys-cluster/rgmanager/files')
-rw-r--r-- | sys-cluster/rgmanager/files/rgmanager-1.0x.conf (renamed from sys-cluster/rgmanager/files/rgmanager.conf) | 2 | ||||
-rwxr-xr-x | sys-cluster/rgmanager/files/rgmanager-1.0x.rc (renamed from sys-cluster/rgmanager/files/rgmanager.rc) | 2 | ||||
-rw-r--r-- | sys-cluster/rgmanager/files/rgmanager-2.0x.conf | 5 | ||||
-rwxr-xr-x | sys-cluster/rgmanager/files/rgmanager-2.0x.rc | 110 |
4 files changed, 117 insertions, 2 deletions
diff --git a/sys-cluster/rgmanager/files/rgmanager.conf b/sys-cluster/rgmanager/files/rgmanager-1.0x.conf index 86c28d4d44d0..88de9e37b846 100644 --- a/sys-cluster/rgmanager/files/rgmanager.conf +++ b/sys-cluster/rgmanager/files/rgmanager-1.0x.conf @@ -1,5 +1,5 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/files/rgmanager.conf,v 1.1 2006/07/13 09:25:23 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/files/rgmanager-1.0x.conf,v 1.1 2008/03/17 17:14:00 xmerlin Exp $ RGMGR_OPTS="" diff --git a/sys-cluster/rgmanager/files/rgmanager.rc b/sys-cluster/rgmanager/files/rgmanager-1.0x.rc index e206bb4ce399..b3b8c13d371f 100755 --- a/sys-cluster/rgmanager/files/rgmanager.rc +++ b/sys-cluster/rgmanager/files/rgmanager-1.0x.rc @@ -3,7 +3,7 @@ # Adaption of the original RedHat script # Original Copyright (C) 2003 Red Hat, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/files/rgmanager.rc,v 1.1 2006/07/13 09:25:23 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/files/rgmanager-1.0x.rc,v 1.1 2008/03/17 17:14:00 xmerlin Exp $ depend() { use net diff --git a/sys-cluster/rgmanager/files/rgmanager-2.0x.conf b/sys-cluster/rgmanager/files/rgmanager-2.0x.conf new file mode 100644 index 000000000000..dd322812cbeb --- /dev/null +++ b/sys-cluster/rgmanager/files/rgmanager-2.0x.conf @@ -0,0 +1,5 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/files/rgmanager-2.0x.conf,v 1.1 2008/03/17 17:14:00 xmerlin Exp $ + +RGMGR_OPTS="" diff --git a/sys-cluster/rgmanager/files/rgmanager-2.0x.rc b/sys-cluster/rgmanager/files/rgmanager-2.0x.rc new file mode 100755 index 000000000000..64156f52268e --- /dev/null +++ b/sys-cluster/rgmanager/files/rgmanager-2.0x.rc @@ -0,0 +1,110 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Adaption of the original RedHat script +# Original Copyright (C) 2003 Red Hat, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/files/rgmanager-2.0x.rc,v 1.1 2008/03/17 17:14:00 xmerlin Exp $ + +depend() { + use net + need cman +} + +# We'd like a reload method as well +opts="${opts} reload" + +ID="Cluster Resource Manager" +RGMGRD=$(which clurgmgrd) +RMTABD=$(which clurmtabd) +CFG_FILE="/etc/cluster/cluster.conf" + +LOG_ERR=3 +LOG_WARNING=4 +LOG_NOTICE=5 +LOG_INFO=6 + +# +# If we're not configured, then don't start anything. +# +[ -f "$CFG_FILE" ] || exit 0 + + +# +# log_and_print <level> <message> +# +function log_and_print() +{ + if [ -z "$1" -o -z "$2" ]; then + return 1; + fi + + clulog -p $$ -n "rgmanager" -s $1 "$2" + echo $2 + + return 0; +} + + +# +# Bring down the cluster on a node. +# +function stop_cluster() +{ + kill -TERM $(pidof $RGMGRD) + + while [ 0 ]; do + if [ -n "`pidof $RGMGRD`" ]; then + while [ -n "`pidof $RGMGRD`" ]; do + sleep 1 + done + einfo "Waiting for $(basename ${RGMGRD})" + else + eend "Services are stopped." + fi + + # Ensure all NFS rmtab daemons are dead. + killall $(basename ${RMTABD}) &> /dev/null + + rm -f /var/run/$(basename ${RGMGRD}).pid + + return 0 + done +} + + + +function start() { + ebegin "Starting cluster resource manager" + start-stop-daemon --start --quiet --exec ${RGMGRD} ${RGMGR_OPTS} + ret=$? + if [ $ret -eq 0 ]; then + touch /var/lock/subsys/rgmanager + fi + eend $ret +} + +function restart() { + pidof ${RGMGRD} &> /dev/null + if [ ${?} -ne 1 ]; then + svc_stop + fi + svc_start +} + +function reload() { + clulog -p ${LOG_NOTICE} "Reloading Resource Configuration." + ebegin "Reloading Resource Configuration " + kill -s HUP $(pidof ${RGMGRD} ) + rv=${?} + eend + exit ${rv} +} + +function stop() { + ebegin "Shutting down cluster resource manager" + if [ -n "$(pidof ${RGMGRD})" ]; then + stop_cluster + fi + rm -f /var/lock/subsys/rgmanager + eend +} |