background image
<< DB2 database | Unmount volumes >>
<< DB2 database | Unmount volumes >>

Read in global script variables

Oracle on the Sun Solaris OS Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C-16
Remote Mirroring of an Oracle Database Using Data Replicator Software
typeset -i VERIFY # Used to echo commands to the
screen only
trap 'trap_exit' 1 2 3 15
while getopts c:dv INPUT
do
case $INPUT in
c) CFG_FILE=$OPTARG ;;
d) DEBUG=1 ;;
v) VERIFY=1 ;;
?) clear
echo "\nUnknown option '$*'"
echo "\nUsage: $0 [-c <CONFIGURATION FILE NAME>] [-d] [-v]"
exit 2
esac
done
if [[ $DEBUG -eq 0 && $VERIFY -eq 1 ]]
then
set -v
elif [[ $DEBUG -eq 1 && $VERIFY -eq 0 ]]
then
set -x
elif [[ $DEBUG -eq 1 && $VERIFY -eq 1 ]]
then
set -v
set -x
fi
##############################################################
# Read in global script variables from db2_erm.conf file. #
##############################################################
CFG_FILE=${CFG_FILE:-erm.conf}
if [[ -f $PWD/$CFG_FILE ]]; then
. $PWD/$CFG_FILE
else
echo "\n${B1} ERROR! ${EB} - Unable to access $PWD/$CFG_FILE
file."
echo "\nPlease make sure the file exists and is accesible by
this user."
echo "\n\nExiting NOW! ERROR: 1"; exit 1
fi
if [[ ! -d $RMT_LOG_DIR ]]; then
echo "\n${B1}ERROR!${EB}"
echo "This host is not properly configured, please run
the sun_erm_setup.ksh"
echo "script first and then run the sun_erm.ksh script.\n"
echo "\n\nExiting NOW! ERROR: 1"; exit 1