From 9617abc9687b995b71f9838fa7b7427e5c851afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Tue, 26 Jan 2021 20:02:22 +0100 Subject: [PATCH] Test is_sge_host earlier --- cluster/apt.apply.update.sh | 4 ++-- cluster/apt.check.update.sh | 6 +++--- cluster/maco.apply.update.sh | 4 ++-- cluster/sge.enable.host.queue.sh | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cluster/apt.apply.update.sh b/cluster/apt.apply.update.sh index 3fceb08..6d189f5 100755 --- a/cluster/apt.apply.update.sh +++ b/cluster/apt.apply.update.sh @@ -262,13 +262,13 @@ Try to clean temp files, downloaded packages,…". # }}} main() { # {{{ - manage_args "${ARGS}" - ## If SGE is not yet available on this host ### Exit is_sge_host \ || exit 0 + manage_args "${ARGS}" + sge_hostname="$(hostname -f)" sge_queues_name="$(qhost -h "${sge_hostname:=/dev/null}" -q -xml \ | grep "queue name" \ diff --git a/cluster/apt.check.update.sh b/cluster/apt.check.update.sh index fe57509..ec5e390 100755 --- a/cluster/apt.check.update.sh +++ b/cluster/apt.check.update.sh @@ -170,15 +170,15 @@ SGE slots currently in use: ${RED}${sge_slots_used:=/dev/null}${COLOR_DEBUG}." # }}} main() { # {{{ - ## Define all vars - define_vars - ## If SGE is not yet available on this host {{{ ### Exit is_sge_host \ || exit 0 ## }}} + ## Define all vars + define_vars + ## If NO APT package upgrade is available {{{ ### Ensure to remove any temp file related to APT upgrades ### AND Exit diff --git a/cluster/maco.apply.update.sh b/cluster/maco.apply.update.sh index 93b9d61..ff9937d 100755 --- a/cluster/maco.apply.update.sh +++ b/cluster/maco.apply.update.sh @@ -259,13 +259,13 @@ Try to clean temp files,…" # }}} main() { # {{{ - manage_args "${ARGS}" - ## If SGE is not yet available on this host ### Exit is_sge_host \ || exit 0 + manage_args "${ARGS}" + sge_hostname="$(hostname -f)" sge_queues_name="$(qhost -h "${sge_hostname:=/dev/null}" -q -xml \ | grep "queue name" \ diff --git a/cluster/sge.enable.host.queue.sh b/cluster/sge.enable.host.queue.sh index 5f4efd2..7622cd3 100755 --- a/cluster/sge.enable.host.queue.sh +++ b/cluster/sge.enable.host.queue.sh @@ -441,14 +441,14 @@ Previously disabled by a script (or FORCE is enable), try to enable SGE queue: $ # }}} main() { # {{{ - ## Define all vars according the selected options - define_vars - ## If SGE is not yet available on this host ### Exit is_sge_host \ || exit 0 + ## Define all vars according the selected options + define_vars + ## If we need to watch for upgrades if [ "${CHECK_UPGRADE}" -eq "0" ]; then ## If APT package upgrade is available