The ha_write_status_for_resource() function writes the status for a resource to the $HA_OUTFILE output file. $1 is the resource name, and $2 is the resource status.
ha_write_status_for_resource()
{
echo $1 $2 >> $HA_OUTFILE;
} |
Similarly, the ha_write_status_for_all_resources() function writes the status for all resources. $HA_RES_NAMES is the list of resource names.
ha_write_status_for_all_resources()
{
for HA_RES in $HA_RES_NAMES
do
echo $HA_RES $1 >> $HA_OUTFILE;
done
} |