The ha_print_exclusive_status() function prints exclusivity check messages to the log file. $1 is the resource name and $2 is the exit status.
ha_print_exclusive_status()
{
if [ $? -eq $HA_NOT_RUNNING ]; then
${HA_LOG} "resource $1 exclusive status: NOT RUNNING"
else
${HA_LOG} "resource $1 exclusive status: RUNNING"
fi
} |
The ha_print_exclusive_status_all_resources() function is similar, but it prints exclusivity check messages for all resources. $HA_RES_NAMES is the list of resource names.
ha_print_exclusive_status_all_resources()
{
for HA_RES in $HA_RES_NAMES
do
ha_print_exclusive_status ${HA_RES} $1
done
} |