Setting up an HP SIM server 6.0 or greater on a Linux-based Serviceguard Cluster White Paper 444847-004, February 2010

33
(( F = F + 1 ))
(( j = j + 1 ))
done
# wait for background mounts to finish
while (( j > 0 ))
do
pid=${pids_list[$j
-
1]}
wait $pid
if (( $? != 0 ))
then
let 0
test_return 3
fi
(( j = j
-
1 ))
done
done
}
# For each {IP address/subnet} pair, add the IP address to the subnet
# using cmmodnet(1m).
#
function add_ip_address
{
S=0
error=
0
for I in ${IP[@]}
do
echo "$(date '+%b %e %T')
-
Node
\
"$(hostname)
\
": Adding IP address
$I to subnet ${SUBNET[$S]}"
XX=$( cmmodnet
-
a
-
i $I ${SUBNET[$S]} 2>&1 )
if (( $? != 0 ))
then
if [[
-
n "$(echo $XX | grep "heartbeat IP")" ]]
then
# IP has been configured as a heartbeat IP address.
echo "$XX" >> $log_file
(( error = 1 ))
else
YY=$( ifconfig | awk '$2 == "'addr:${I}'"')
if [[
-
z "${YY}" ]]
then
echo "$XX" >> $log_file
echo "ERROR: Failed to add IP
$I to subnet
${SUBNET[$S]}"
(( error = 1 ))
else
echo "WARNING: IP $I is already configured on the subnet
${SUBNET[$S]}"
fi
fi
fi
(( S = $S + 1 ))
done
if (( error != 0 ))
then