From a28db35228dc5ac782c915f4fa558d3c3ee53ba8 Mon Sep 17 00:00:00 2001 From: Yacine31 Date: Tue, 26 Dec 2023 00:10:40 +0100 Subject: [PATCH] corrections de syntaxe --- backup_rman.sh | 12 +++++++----- backup_rman_AL.sh | 8 +++++--- backup_rman_AL_fct_FRA_Usage.sh | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/backup_rman.sh b/backup_rman.sh index c5f64c7..a40d9d3 100755 --- a/backup_rman.sh +++ b/backup_rman.sh @@ -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 < 0, donc backup RMAN en cours ... on quitte + f_print "... " + f_print "Sauvegarde RMAN en cours ... fin du script" + f_print "... " exit 2 fi diff --git a/backup_rman_AL.sh b/backup_rman_AL.sh index 7114d64..7dfb13e 100755 --- a/backup_rman_AL.sh +++ b/backup_rman_AL.sh @@ -111,9 +111,11 @@ EOF ) RUNNING_RMAN=$(echo ${RUNNING_RMAN} | sed 's/^\s*//g') -if [ ${RUNNING_RMAN} -eq 0 ]; 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 diff --git a/backup_rman_AL_fct_FRA_Usage.sh b/backup_rman_AL_fct_FRA_Usage.sh index 7a2ac1a..dc38458 100755 --- a/backup_rman_AL_fct_FRA_Usage.sh +++ b/backup_rman_AL_fct_FRA_Usage.sh @@ -24,7 +24,7 @@ do # Variables d'initialisation script_dir=/home/oracle/scripts - pct_limit=80 + pct_limit=85 action_script="${script_dir}/backup_rman_AL.sh ${ORACLE_SID}" #