Sample Configurations with SGeRAC and Oracle RAC 10gR2, March 2009

48
# <enable> Enable the Oracle Cluster Software to autostart
# <disable> Disable the Oracle Cluster Software from autostart
#########################################################################
###
# Function: log_message
#
# This function log any message with date, time and node name affixed
# to it. It accepts just one parameter.
# Parameter:
# 1. Message to be logged
#########################################################################
####
function log_message
{
if [ $# -eq 1 ]; then
echo "$(date '+%b %e %T') - Node \"${HOST}\" $1 "
else
echo
fi
}
#########################################################################
####
# Function: cssd_run_cmds
#
# Start CRS cssd daemons
#########################################################################
####
function cssd_run_cmds
{
set -A TMP_MONITOR_PROCESSES ${CSSD_MONITOR_PROCESSES[@]}
typeset -i c
typeset -i tmp_num_procs=${#TMP_MONITOR_PROCESSES[@]}
$ORA_CRS_HOME/bin/crsctl start crs
# Wait for daemon to start
while true
do
for i in ${TMP_MONITOR_PROCESSES[@]}
do
id=`ps -fu $ORACLE_USER | awk '/'${i}$'/ { print $2 }'`
if [[ ${id} != "" ]]
then
print "\n *** ${i} process has started. ***\n"
c=0
while (( c < $tmp_num_procs ))
do
if [[ ${TMP_MONITOR_PROCESSES[$c]} = $i ]]
then
unset TMP_MONITOR_PROCESSES[$c]
c=$tmp_num_procs
fi
(( c = c + 1 ))
done
fi
done
if [[ ${TMP_MONITOR_PROCESSES[@]} = "" ]]