From de494b76c1fd44deb18688f56fb85b059bc52710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Mon, 22 Jun 2020 20:42:09 +0200 Subject: [PATCH] FORCE_MODE implies to don't check for upgrade --- cluster/sge.enable.host.queue.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/cluster/sge.enable.host.queue.sh b/cluster/sge.enable.host.queue.sh index 256bb5b..d5a49fb 100755 --- a/cluster/sge.enable.host.queue.sh +++ b/cluster/sge.enable.host.queue.sh @@ -11,9 +11,6 @@ readonly NBARGS="${#}" # If output message should be displayed [ -z "${OUTPUT_MESSAGE}" ] && OUTPUT_MESSAGE=0 -# If SGE queues should be re-enable even if disabled manually (by a user) -[ -z "${FORCE_MODE}" ] && FORCE_MODE=1 - # Maco temp file readonly MACO_TMP_FILE="/tmp/.maco.upgrade" readonly MACO_TMP_URGENT_FILE="/tmp/.maco.urgent.upgrade" @@ -100,12 +97,19 @@ define_vars() { # {{{ ${sge_hostname} is the current host." ## Enable to verify if pending upgrades are present CHECK_UPGRADE="0" - else + else ## In case of a remote host debug_message "define_vars − \ ${sge_hostname} is not the current host." - ## No way to monitor pending upgrades of a remote host + ## Force to (re)enable SGE queue(s) in any case + FORCE_MODE="0" + fi + + ## If FORCE_MODE was defined and enabled + if [ -n "${FORCE_MODE}" ] && [ "${FORCE_MODE}" -eq "0" ]; then + ## Disable upgrade checking (remote host, asked behaviour,…) CHECK_UPGRADE="1" - ## Force SGE to (re)enable the queue even if it was manually disabled + else + ## Ensure to define a value FORCE_MODE="1" fi