Database Reference
In-Depth Information
# --------------------------------------------------------------------------------------------------
# The longer list from the repository was created in case the local agent did not
# contain any targets. We'll replace the OMR list with the targets known to the
# local agent if any exist
# --------------------------------------------------------------------------------------------------
if [ `cat ${EMCTL_DATABASES} | wc -l` -gt 0 ]; then
cat /dev/null >${OEM_DATABASES}
for thisTARGET in `cat ${EMCLI_DATABASES}`; do
if [ `cat ${EMCTL_DATABASES} | grep -i ${thisTARGET} | wc -l` -eq 0 ]; then
echo "${thisTARGET}" >>${OEM_DATABASES}
fi
done
else
mv -f ${EMCLI_DATABASES} ${OEM_DATABASES}
fi
# --------------------------------------------------------------------------------------------------
# Same process happens for the listeners
# --------------------------------------------------------------------------------------------------
if [ `cat ${EMCTL_LISTENERS} | wc -l` -gt 0 ]; then
cat /dev/null >${OEM_LISTENERS}
for thisTARGET in `cat ${EMCLI_LISTENERS}`; do
if [ `cat ${EMCTL_LISTENERS} | grep -i ${thisTARGET} | wc -l` -eq 0 ]; then
echo "${thisTARGET}" >>${OEM_LISTENERS}
fi
done
else
mv -f ${EMCLI_LISTENERS} ${OEM_LISTENERS}
fi
# --------------------------------------------------------------------------------------------------
# Compare the OEM target list with the Veritas members and build emcli scripts
# --------------------------------------------------------------------------------------------------
if [ `cat ${VCS_DATABASES} | wc -l` -gt 0 ]; then
cat /dev/null >${MOVING_DATABASES}
for thisITEM in `cat ${VCS_DATABASES}`; do
cat ${OEM_DATABASES} | grep -i ${thisITEM} >>${MOVING_DATABASES}
done
fi
cat /dev/null >${EMCLI_SCRIPT}
if [ `cat ${MOVING_DATABASES} | wc -l` -gt 0 ]; then
echo "\n\nThese database targets will be relocated"
thisFILE=${MOVING_DATABASES}
ListNicely
Search WWH ::




Custom Search