Script variables and file access
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
erm.ksh
Remote Mirroring of an Oracle Database Using Data Replicator Software
B-33
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 \a"
fi
}
Kill_WAIT ()
{
if [[ $1 -eq 0 ]]; then
kill -s USR1 $WPID
trap_WAIT 0
tput sgr0
tput cnorm
return 0
elif [[ $1 -eq 1 ]]; then
kill -s USR2 $WPID
trap_WAIT 1
tput sgr0
tput cnorm
return 1
elif [[ $1 -eq 2 ]]; then
kill -s USR2 $WPID
trap_WAIT 2
tput sgr0
tput cnorm
return 1
elif [[ $1 -eq 3 ]]; then
kill -s USR2 $WPID
trap_WAIT 3
tput sgr0
tput cnorm
return 1
elif [[ $1 -eq 4 ]]; then
kill -s USR2 $WPID
trap_WAIT 4
tput sgr0
tput cnorm
return 1
elif [[ $1 -eq 5 ]]; then
kill -s USR2 $WPID 2>/dev/null