Get env from oratab not oraenv

This commit is contained in:
2025-11-11 09:06:47 -05:00
parent bd7d5da70e
commit 04d946aa00
3 changed files with 30 additions and 37 deletions

View File

@@ -268,12 +268,22 @@ get_log_mv() {
exit_with_error
fi
else
mvId=$(awk '{match($0, /ManagedVolume:::[a-z0-9-]*/); if (RSTART > 0) {id=substr($0, RSTART, RLENGTH); sub(/"$/, "", id); print id}}' /tmp/rbkresponse.$$)
numChannels=$(awk '{match($0, /"numChannels":[ ]*[0-9]+/); if (RSTART > 0) {val=substr($0, RSTART, RLENGTH); sub(/.*:[ ]*/, "", val); print val}}' /tmp/rbkresponse.$$)
mvId=$(awk '{match($0, /ManagedVolume:::[a-z0-9-]*/); if (RSTART > 0) {id=substr($0, RSTART, RLENGTH); sub(/"$/, "", id); print id}}' /tmp/rbkresponse.$$)
numChannels=$(awk '{match($0, /"numChannels":[ ]*[0-9]+/); if (RSTART > 0) {val=substr($0, RSTART, RLENGTH); sub(/.*:[ ]*/, "", val); print val}}' /tmp/rbkresponse.$$)
logMvPresent=1
echo "INFO: Log volume ($mv_name) exists with $numChannels channels"
echo "INFO: Log volume ($mv_name) exists with $numChannels channels"
fi
}
set_oracle_env() {
ORACLE_HOME=$(awk -F: '$1 == "'$1'" {print $2}' /etc/oratab)
PATH=$PATH:$ORACLE_HOME/bin
ORACLE_SID=$1
if [ -z "$ORACLE_HOME" ]; then
echo "ERROR: SID $1 not found in /etc/oratab"
exit_with_error
fi
}
open_mv() {
@@ -308,5 +318,4 @@ cleanup() {
echo "`$DATE` -$$-: EXITED $0 $@" >> $LOGFILE
rm -f /tmp/rbkresponse.$$
rm -f $PIDFILE
}
}