Test apt upgrade before all sub-tests
This commit is contained in:
parent
7c2edce71d
commit
62128c89bb
|
@ -235,57 +235,57 @@ main() { # {{{
|
||||||
&& exit 0
|
&& exit 0
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
## If SGE used slots is more than 75% of total slots AND {{{
|
## If APT package upgrade(s) is available AND
|
||||||
|
is_apt_upgrade_present \
|
||||||
|
&& {
|
||||||
|
## If SGE used slots is more than 75% of total slots {{{
|
||||||
## APT package upgrade is available
|
## APT package upgrade is available
|
||||||
### Create a temp file
|
### Create a temp file
|
||||||
### Disable SGE queue
|
### Disable SGE queue
|
||||||
is_sge_slots_more_than_percentage "75" \
|
is_sge_slots_more_than_percentage "75" \
|
||||||
&& is_apt_upgrade_present \
|
|
||||||
&& touch "${APT_TMP_FILE}" && echo "APT upgrade is available." >> "${APT_TMP_FILE}" \
|
&& touch "${APT_TMP_FILE}" && echo "APT upgrade is available." >> "${APT_TMP_FILE}" \
|
||||||
&& sh "${sge_disable_host_queue_script}" \
|
&& sh "${sge_disable_host_queue_script}" \
|
||||||
&& exit 0
|
&& exit 0
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
## If pending upgrade since 3~4 days AND {{{
|
## If pending upgrade since 3~4 days {{{
|
||||||
## APT package upgrade is available
|
## APT package upgrade is available
|
||||||
### Create a temp file
|
### Create a temp file
|
||||||
### Disable SGE queue
|
### Disable SGE queue
|
||||||
is_pending_upgrade_more_than_days "3" \
|
is_pending_upgrade_more_than_days "3" \
|
||||||
&& is_apt_upgrade_present \
|
|
||||||
&& touch "${APT_TMP_FILE}" && echo "APT upgrade is available." >> "${APT_TMP_FILE}" \
|
&& touch "${APT_TMP_FILE}" && echo "APT upgrade is available." >> "${APT_TMP_FILE}" \
|
||||||
&& sh "${sge_disable_host_queue_script}" \
|
&& sh "${sge_disable_host_queue_script}" \
|
||||||
&& exit 0
|
&& exit 0
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
## If SGE used slots is NULL AND {{{
|
## If SGE used slots is NULL {{{
|
||||||
## APT package upgrade is available
|
## APT package upgrade is available
|
||||||
### Create a temp file
|
### Create a temp file
|
||||||
### Disable SGE queue
|
### Disable SGE queue
|
||||||
is_sge_slots_empty \
|
is_sge_slots_empty \
|
||||||
&& is_apt_upgrade_present \
|
|
||||||
&& touch "${APT_TMP_FILE}" && echo "APT upgrade is available." >> "${APT_TMP_FILE}" \
|
&& touch "${APT_TMP_FILE}" && echo "APT upgrade is available." >> "${APT_TMP_FILE}" \
|
||||||
&& sh "${sge_disable_host_queue_script}" \
|
&& sh "${sge_disable_host_queue_script}" \
|
||||||
&& exit 0
|
&& exit 0
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
## If pending job list is empty AND {{{
|
## If pending job list is empty {{{
|
||||||
## APT package upgrade is available
|
## APT package upgrade is available
|
||||||
### Create a temp file
|
### Create a temp file
|
||||||
### Disable SGE queue
|
### Disable SGE queue
|
||||||
is_pending_job_empty \
|
is_pending_job_empty \
|
||||||
&& is_apt_upgrade_present \
|
|
||||||
&& touch "${APT_TMP_FILE}" && echo "APT upgrade is available." >> "${APT_TMP_FILE}" \
|
&& touch "${APT_TMP_FILE}" && echo "APT upgrade is available." >> "${APT_TMP_FILE}" \
|
||||||
&& sh "${sge_disable_host_queue_script}" \
|
&& sh "${sge_disable_host_queue_script}" \
|
||||||
&& exit 0
|
&& exit 0
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
## After all if APT package upgrade is available {{{
|
## After all just add content to a temp file {{{
|
||||||
### Just add content to a temp file
|
touch "${APT_TMP_FILE}" && echo "APT upgrade is available." >> "${APT_TMP_FILE}" \
|
||||||
is_apt_upgrade_present \
|
&& debug_message "main − Add content to temp file for pending upgrade(s)." \
|
||||||
&& touch "${APT_TMP_FILE}" && echo "APT upgrade is available." >> "${APT_TMP_FILE}" \
|
|
||||||
&& exit 0
|
&& exit 0
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue