Database priviledges
Oracle on the Sun Solaris OS Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C-24
Remote Mirroring of an Oracle Database Using Data Replicator Software
trap_WAIT ()
{
if [[ $1 -eq 0 ]]; then
echo "`tput rc``tput sgr0``tput setab 0``tput
setaf 2`\b OK "
elif [[ $1 -eq 1 ]]; then
echo "`tput rc``tput sgr0``tput setab 0``tput
setaf 1`\b ERROR! "
elif [[ $1 -eq 2 ]]; then
echo "`tput rc``tput sgr0``tput setab 0``tput
setaf 3`\b WARNING "
elif [[ $1 -eq 3 ]]; then
echo "`tput rc``tput sgr0``tput setab 0``tput
setaf 7`\b STARTED "
elif [[ $1 -eq 4 ]]; then
echo "`tput rc``tput sgr0``tput setab 0``tput
setaf 7`\b WAITING "
elif [[ $1 -eq 5 ]]; then
echo "`tput rc``tput sgr0``tput setab 0``tput
setaf 2`\b DONE "
fi
}
Kill_WAIT ()
{
kill -s USR1 $WPID
trap_WAIT $1
tput sgr0
tput cnorm
return 0
}
display ()
{
echo "`tput sc`$1...`tput rc``tput cuf 69`\c"
WAIT &
WPID=$!
}
trap_exit ()
{
Kill_WAIT 1
exit 1
}
# **** End of FUNCTIONS ****
# **** Start of Main script ****
##############################################