Use same var prefix "sge_queue_flag"

This commit is contained in:
Jeremy Gardais 2020-07-06 16:19:11 +02:00
parent fdbc34e5cc
commit 46ceeb5baf
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 4 additions and 4 deletions

View File

@ -320,7 +320,7 @@ is_queue_disable() { # {{{
return_queue_disable="1" return_queue_disable="1"
## Ensure to remove any previously setted file ## Ensure to remove any previously setted file
rm -f -- "${sge_queue_deactivator}" rm -f -- "${sge_queue_flag_file}"
;; ;;
3 ) ## Results (header + queue name) so the queue is disable 3 ) ## Results (header + queue name) so the queue is disable
local_sge_queue_state="disable" local_sge_queue_state="disable"
@ -369,7 +369,7 @@ enable_sge_queue() { # {{{
local_sge_queue_name="${2}" local_sge_queue_name="${2}"
## If the queue was previously disabled by another script OR if FORCE_MODE is enable ## If the queue was previously disabled by another script OR if FORCE_MODE is enable
if [ -f "${sge_queue_deactivator}" ] || [ "${FORCE_MODE}" -eq "0" ]; then if [ -f "${sge_queue_flag_file}" ] || [ "${FORCE_MODE}" -eq "0" ]; then
debug_message "enable_sge_queue \ debug_message "enable_sge_queue \
Previously disabled by a script (or FORCE is enable), try to enable SGE queue: ${RED}${local_sge_queue_name:=/dev/null}@${local_sge_hostname:=/dev/null}${COLOR_DEBUG}." Previously disabled by a script (or FORCE is enable), try to enable SGE queue: ${RED}${local_sge_queue_name:=/dev/null}@${local_sge_hostname:=/dev/null}${COLOR_DEBUG}."
## SGE command to enable the queue ## SGE command to enable the queue
@ -444,7 +444,7 @@ for host: ${RED}${sge_hostname:=/dev/null}${COLOR_DEBUG}."
## File previously set if the queue was disabled by a script ## File previously set if the queue was disabled by a script
## "automatically disabled" for an upgrade ## "automatically disabled" for an upgrade
sge_queue_deactivator="/opt/ipr/cluster/.sge.${loop_queue}.disable" sge_queue_flag_file="${cluster_dir}/.sge.${loop_queue}.disable"
## If the queue is disable ## If the queue is disable
### Try to enable it ### Try to enable it
@ -452,7 +452,7 @@ for host: ${RED}${sge_hostname:=/dev/null}${COLOR_DEBUG}."
&& enable_sge_queue "${sge_hostname}" "${loop_queue}" && enable_sge_queue "${sge_hostname}" "${loop_queue}"
## Don't consider manually disabled queue as an error except if FORCE_MODE was specified ## Don't consider manually disabled queue as an error except if FORCE_MODE was specified
if [ -f "${sge_queue_deactivator}" ] || [ "${FORCE_MODE}" -eq "0" ]; then if [ -f "${sge_queue_flag_file}" ] || [ "${FORCE_MODE}" -eq "0" ]; then
## If the queue is still disable ## If the queue is still disable
### Exit with error ### Exit with error
is_queue_disable "${sge_hostname}" "${loop_queue}" \ is_queue_disable "${sge_hostname}" "${loop_queue}" \