(re)enable SGE queue only if disable by a script
Test if /etc/.sge.${QUEUE_NAME}.disable exist
This commit is contained in:
parent
138aecfb47
commit
3d01cb8487
|
@ -218,13 +218,19 @@ enable_sge_queue() { # {{{
|
||||||
local_sge_hostname="${1}"
|
local_sge_hostname="${1}"
|
||||||
local_sge_queue_name="${2}"
|
local_sge_queue_name="${2}"
|
||||||
|
|
||||||
## Simple debug message to valid current variables
|
local_sge_disable="/etc/.sge.${local_sge_queue_name}.disable"
|
||||||
|
|
||||||
|
## If the queue was previously disabled by another script
|
||||||
|
if [ -f "${local_sge_disable}" ]; then
|
||||||
debug_message "enable_sge_queue − \
|
debug_message "enable_sge_queue − \
|
||||||
Try to enable SGE queue: ${RED}${local_sge_queue_name:=/dev/null}@${local_sge_hostname:=/dev/null}${COLOR_DEBUG}."
|
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
|
||||||
qmod --enable "${local_sge_queue_name}@${local_sge_hostname}" \
|
qmod --enable "${local_sge_queue_name}@${local_sge_hostname}" \
|
||||||
&& return_enable_queue="${?}"
|
&& return_enable_queue="${?}"
|
||||||
|
else
|
||||||
|
debug_message "SGE queue: ${RED}${local_sge_queue_name:=/dev/null}@${local_sge_hostname:=/dev/null}${RESET} was manually disabled, please re-enable it ${RED}manually${RESET}."
|
||||||
|
return_enable_queue="1"
|
||||||
|
fi
|
||||||
|
|
||||||
return "${return_enable_queue}"
|
return "${return_enable_queue}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue