Exit if the queue is already disable
This commit is contained in:
parent
ea3ecf26cf
commit
1e2bbcea40
|
@ -102,7 +102,7 @@ is_queue_disable() { # {{{
|
||||||
;;
|
;;
|
||||||
* ) ## Unexpected result
|
* ) ## Unexpected result
|
||||||
printf '%b\n' "${RED}Not able to determine the state of ${local_sge_queue_name:=/dev/null}@${local_sge_hostname:=/dev/null} queue.${RESET}"
|
printf '%b\n' "${RED}Not able to determine the state of ${local_sge_queue_name:=/dev/null}@${local_sge_hostname:=/dev/null} queue.${RESET}"
|
||||||
exit 2
|
exit 3
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -145,15 +145,15 @@ main() { # {{{
|
||||||
SGE queue: ${RED}${sge_queue_name:=/dev/null}${COLOR_DEBUG} \
|
SGE queue: ${RED}${sge_queue_name:=/dev/null}${COLOR_DEBUG} \
|
||||||
for host: ${RED}${sge_hostname:=/dev/null}${COLOR_DEBUG}."
|
for host: ${RED}${sge_hostname:=/dev/null}${COLOR_DEBUG}."
|
||||||
|
|
||||||
|
## If the queue is already disable
|
||||||
|
### Exit
|
||||||
|
is_queue_disable "${sge_hostname}" "${sge_queue_name}" \
|
||||||
|
&& exit 0
|
||||||
|
|
||||||
## If the queue is enable
|
## If the queue is enable
|
||||||
### Try to disable it
|
### Try to disable it
|
||||||
is_queue_enable "${sge_hostname}" "${sge_queue_name}" \
|
is_queue_enable "${sge_hostname}" "${sge_queue_name}" \
|
||||||
&& disable_sge_queue "${sge_hostname}" "${sge_queue_name}"
|
&& disable_sge_queue "${sge_hostname}" "${sge_queue_name}"
|
||||||
#&& printf '%b\n' "function disable_queue."
|
|
||||||
|
|
||||||
## If the queue is disable
|
|
||||||
### Nothing to do
|
|
||||||
is_queue_disable "${sge_hostname}" "${sge_queue_name}"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
|
|
Loading…
Reference in New Issue