/usr/share/heartbeat/hb_standby is in heartbeat 1:3.0.6-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | #!/bin/sh
#
# Support: linux-ha-dev@lists.tummy.com
# License: GNU General Public License (GPL)
#
# This script sets the node (where it was called) to *standby*
# It forces the node to release all the held resources and lets
# the other node do a takeover.
# This script will only work for a two machine setup...
# More than that and you need to vote, or something...
HA_DIR=/etc/ha.d
. ${HA_DIR}/shellfuncs
: Now running $0: $*
usage() {
echo "usage:"
echo "$0 [all|foreign|local|failback]" >&2
exit 1;
}
if
[ $# -ge 2 ]
then
echo "$0: too many arguments"
usage
exit 1
fi
if
[ $# -ge 1 ]
then
resources=$1
else
resources=all
fi
if [ $resources != "all" ] && [ $resources != "foreign" ] &&
[ $resources != "local" ] && [ $resources != "failback" ] &&
[ $resources != "--help" ]; then
echo "$0: wrong resources($resources)."
usage
exit 1
fi
case $resources in
all|foreign|local) ;;
failback) resources=foreign;;
*) usage;;
esac
ha_log "Going standby [$resources]."
ha_clustermsg <<-!MSG
t=ask_resources
rsc_hold=$resources
info=me
!MSG
|