Setting up HP SIM 5.x on an HP-UX Serviceguard Cluster (448492-002, February 2008)

30
# if there is permission to kill the user, we can
# run fuser to kill the user, on the mount point.
# This would freeup the mount point, if it is busy
if (( $FS_MOUNT_RETRY_COUNT > 0 ))
then
(
mount ${FS_TYPE_ARG[$F]} ${FS_MOUNT_OPT[$F]} $I ${FS[$F]}
if (( $? != 0 ))
then
freeup_busy_mountpoint_and_mount_fs $I $
{FS[$F]}
\
${FS_TYPE_ARG[$F]} ${FS_MOUNT_OPT[$F]}
fi
) &
else
(
mount ${FS_TYPE_ARG[$F]} ${FS_MOUNT_OPT[$F]} $I ${FS[$F]}
) &
fi
# save the process id for monitor
ing status
pids_list[$j]="$!"
else
echo "$(date '+%b %e %T')
-
Node
\
"$(hostname)
\
": WARNING: File system
\
"${FS[$F]}
\
" was already mounted."
fi
(( F = F + 1 ))
(( j = j + 1 ))
done
# wait for background mounts to fi
nish
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