Use same var prefix "sge_queue_flag"
This commit is contained in:
parent
fdbc34e5cc
commit
46ceeb5baf
|
@ -320,7 +320,7 @@ is_queue_disable() { # {{{
|
|||
return_queue_disable="1"
|
||||
|
||||
## 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
|
||||
local_sge_queue_state="disable"
|
||||
|
@ -369,7 +369,7 @@ enable_sge_queue() { # {{{
|
|||
local_sge_queue_name="${2}"
|
||||
|
||||
## 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 − \
|
||||
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
|
||||
|
@ -444,7 +444,7 @@ for host: ${RED}${sge_hostname:=/dev/null}${COLOR_DEBUG}."
|
|||
|
||||
## File previously set if the queue was disabled by a script
|
||||
## "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
|
||||
### Try to enable it
|
||||
|
@ -452,7 +452,7 @@ for host: ${RED}${sge_hostname:=/dev/null}${COLOR_DEBUG}."
|
|||
&& enable_sge_queue "${sge_hostname}" "${loop_queue}"
|
||||
|
||||
## 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
|
||||
### Exit with error
|
||||
is_queue_disable "${sge_hostname}" "${loop_queue}" \
|
||||
|
|
Loading…
Reference in New Issue