summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-12-04 14:23:27 +0100
committerMichał Górny <mgorny@gentoo.org>2018-12-04 14:23:27 +0100
commite4ea13189976bd3e68c247be4b5d4daf4758bd00 (patch)
tree71f595ffba523807ca1c92f7fa90bdf395b631fb /sys-cluster/rgmanager/files/rgmanager-2.0x.rc
parentsys-cluster/rgmanager-agents: Remove last-rited pkg (diff)
downloadgentoo-e4ea13189976bd3e68c247be4b5d4daf4758bd00.tar.gz
gentoo-e4ea13189976bd3e68c247be4b5d4daf4758bd00.tar.bz2
gentoo-e4ea13189976bd3e68c247be4b5d4daf4758bd00.zip
sys-cluster/rgmanager: Remove last-rited pkg
Closes: https://bugs.gentoo.org/618050 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-cluster/rgmanager/files/rgmanager-2.0x.rc')
-rw-r--r--sys-cluster/rgmanager/files/rgmanager-2.0x.rc109
1 files changed, 0 insertions, 109 deletions
diff --git a/sys-cluster/rgmanager/files/rgmanager-2.0x.rc b/sys-cluster/rgmanager/files/rgmanager-2.0x.rc
deleted file mode 100644
index d7d77d47fbe2..000000000000
--- a/sys-cluster/rgmanager/files/rgmanager-2.0x.rc
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/sbin/openrc-run
-# 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
-
-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
-}