Use `find … -delete` to remove file with pattern
This commit is contained in:
parent
9617abc968
commit
3126864255
|
@ -374,7 +374,8 @@ is_queue_disable() { # {{{
|
|||
return_queue_disable="1"
|
||||
|
||||
## Ensure to remove any previously setted file
|
||||
rm -f -- "${sge_queue_flag_file}"
|
||||
# shellcheck disable=SC2086
|
||||
find ${sge_queue_flag_file} -delete
|
||||
;;
|
||||
3 ) ## Results (header + queue name) so the queue is disable
|
||||
local_sge_queue_state="disable"
|
||||
|
@ -507,9 +508,10 @@ for host: ${RED}${sge_hostname:=/dev/null}${COLOR_DEBUG}."
|
|||
|
||||
## If the queue(s) are already enable
|
||||
### Ensure to remove any potential flag file
|
||||
# shellcheck disable=SC2086
|
||||
### Exit
|
||||
is_all_queue_enable "${sge_hostname}" "${sge_queues_name}" \
|
||||
&& rm -f -- "${sge_queue_flag_pattern}" \
|
||||
&& find ${sge_queue_flag_pattern} -delete \
|
||||
&& exit 0
|
||||
|
||||
## Test all queues one by one
|
||||
|
|
Loading…
Reference in New Issue