corrections de syntaxe

This commit is contained in:
Yacine31
2023-12-26 00:10:40 +01:00
parent 42b98bbf44
commit a28db35228
3 changed files with 13 additions and 9 deletions

View File

@@ -109,18 +109,20 @@ install -d ${BKP_LOG_DIR}
#
# si une autre sauvegarde est en cours, on quitte
#
{RUNNING_RMAN}=$($ORACLE_HOME/bin/sqlplus -S / as sysdba <<EOF
RUNNING_RMAN=$($ORACLE_HOME/bin/sqlplus -S / as sysdba <<EOF
set heading off
set feedback off
set echo off
select count(*) from v\$rman_backup_job_details where STATUS IN ('RUNNING', 'EXECUTING');
EOF
)
{RUNNING_RMAN}=$(echo ${RUNNING_RMAN} | sed 's/^\s*//g')
RUNNING_RMAN=$(echo ${RUNNING_RMAN} | sed 's/^\s*//g')
if [ -n "${RUNNING_RMAN}" ]; then
# RUNNING_RMAN n'est pas vide, donc backup RMAN en cours ... on quitte
f_print("Sauvegarde RMAN en cours ... fin du script")
if [ "${RUNNING_RMAN}" -gt 0 ]; then
# RUNNING_RMAN retourne une valeur > 0, donc backup RMAN en cours ... on quitte
f_print "... "
f_print "Sauvegarde RMAN en cours ... fin du script"
f_print "... "
exit 2
fi