background image
<< Set debug option | Trace file for debugging >>
<< Set debug option | Trace file for debugging >>

Echo commands

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The
linux_erm.ksh
Script
Remote Mirroring of an Oracle Database Using Data Replicator Software
D-17
echo "script first and then run the linux_erm.ksh
script.\n"
echo "\n\nExiting NOW! ERROR: 1"; exit 1
fi
# Sets Flash Copy script log file...
LOG=$RMT_LOG_DIR/linux_erm_${RMT_HOST}_log.`date
+%m%d%y'.'%H%M`
# Used to capture all stdout and errors during execution.
TRACE=$RMT_LOG_DIR/linux_erm_$RMT_HOST.trace
echo "Trace started at `date +%T` on `date +%A' '%B', '%d' '%Y`"
> $TRACE
echo `date +%T`" Started on `date +%A' '%B' '%e', '%Y' @
'%H:%M`" >> $LOG
chmod 777 $LOG
echo `date +%T`" Using config file $RMT_SCRIPT_DIR/$CFG_FILE"
>> $LOG
chmod 777 $TRACE
# BEGIN Defined Functions
unmount ()
{
###########################################
#
FUNCTION used to unmount volumes
#
###########################################
# Args:
# $1 = Index number of volume to process
if [[ $VERIFY -eq 1 ]]; then
set -n
elif [[ $DEBUG -eq 1 && $VERIFY -eq 0 ]]; then
set -x
fi
display "Unmounting ${VOL_MNT[$1]}"
# Write command to $TRACE file for debugging
echo "# umount ${VOL_MNT[$1]}" >> $TRACE
umount ${VOL_MNT[$1]} >> $TRACE 2>&1
sleep 1
if (( $(mount | grep -c "${VOL_MNT[$1]}") > 0 )); then
echo `date +%T`" ERROR: 32 - Unable to unmount
${VOL_MNT[$1]}!" >> $LOG
Kill_WAIT 1