background image
<< LSI Logic Storage Systems | Capture all stdout >>
<< LSI Logic Storage Systems | Capture all stdout >>

db2_erm.conf file

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
erm.ksh
Remote Mirroring of an Oracle Database Using Data Replicator Software
B-21
?) clear
echo "\nUnknown option '$*'"
echo "\nUsage: $0 [-c <CONFIGURATION FILE NAME>] [-d]"
exit 2
esac
done
if [[ $DEBUG -eq 1 ]]; then
set -x
fi
#-------------------------------------------------------------
# Check for 'root' access.
#-------------------------------------------------------------
if [[ $(id | grep -c 'uid=0(root)') -lt 1 ]]; then
clear
echo "\nThis script must be run as root user. Please login
as 'root'.\n"
exit 1
fi
#-------------------------------------------------------------
# Read in global script variables from db2_erm.conf file.
#-------------------------------------------------------------
CFG_FILE=${CFG_FILE:-/opt/LSI_ERM/erm.conf}
if [[ -f $CFG_FILE ]]; then
. $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 erm_setup.ksh script"
echo "first and then run the erm.ksh script.\n"
echo "\n\nExiting NOW! ERROR: 1"; exit 1
fi
# Clear display if aborted in the middle
trap 'CleanUp' 1 2 3 15
# Sets Snapshot script log file...
TIME_STAMP=`date +%m%d%y'.'%H%M`
LOG=$RMT_LOG_DIR/${PRI_HOST}_erm_log.$TIME_STAMP
TRACE=$RMT_LOG_DIR/${PRI_HOST}_erm_trace.$TIME_STAMP