FORCE_MODE implies to don't check for upgrade

This commit is contained in:
Jeremy Gardais 2020-06-22 20:42:09 +02:00
parent d6f266a129
commit de494b76c1
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 10 additions and 6 deletions

View File

@ -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