/etc/ha.d/rc.d/ip-request-resp is in heartbeat 1:3.0.5-3ubuntu2.
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 | #!/bin/sh
#
# License: GNU General Public License (GPL)
#
# This script is called in response to an ip-request message after the
# one we've called calls us back.
#
# What we do then is to take over the IP address requested...
#
# Note: this script is called by the heartbeat code, so it gets all
# kinds of funny arguments
#
# "ip-request-resp"
. $HA_FUNCS
#
#
US="ip-request-resp"
TAKE=$HA_NOARCHBIN/ResourceManager
CMD=$1
#
# $HA_dest, $HA_ipaddr and $HA_ok are fields from the message
#
REQNODE=$HA_dest
RSCGRPNAME=$HA_ipaddr
RESPONSE=$HA_ok
THEYOWN=$HA_weown
# Really a resource group name...
case "$RSCGRPNAME" in
?*) false;;
*)
cat <<-!EOF
$0 will take control the specified resource group using $TAKE.
$0 was invoked with these arguments:
$*
And this is the HA_ environment:
!EOF
env | grep '^HA_'
exit 1;;
esac
if
[ "X$REQNODE" != "X$HA_CURHOST" ]
then
exit 0; # We didn't request this IP address... Ignore the response.
fi
ha_log "received $US $RSCGRPNAME $RESPONSE $THEYOWN"
case $RESPONSE in
OK) $TAKE takegroup $RSCGRPNAME;;
*);;
esac
|