Prepare host if an upgrade is required
This commit is contained in:
parent
85ded81370
commit
9adce8cb1e
|
@ -62,7 +62,7 @@ message() { # {{{
|
|||
local_message="${1}"
|
||||
|
||||
## Print message if OUTPUT_MESSAGE is enable (=0)
|
||||
[ "${OUTPUT_MESSAGE}" -eq "0" ] && printf '%b' "${local_message}"
|
||||
[ "${OUTPUT_MESSAGE}" -eq "0" ] && printf '%b\n' "${local_message}"
|
||||
|
||||
return 0
|
||||
|
||||
|
@ -123,6 +123,18 @@ Local Maco version (${CURRENT_MACO_VERSION}) is different from latest version ($
|
|||
|
||||
return "${return_uptodate}"
|
||||
|
||||
}
|
||||
# }}}
|
||||
prepare_host_for_upgrade() { # {{{
|
||||
|
||||
disable_host_queue_script="${PROGDIR}/disable.host.queue.sh"
|
||||
|
||||
debug_message "prepare_host_for_upgrade − \
|
||||
Disable SGE queue."
|
||||
sh "${disable_host_queue_script}"
|
||||
|
||||
return "${?}"
|
||||
|
||||
}
|
||||
# }}}
|
||||
main() { # {{{
|
||||
|
@ -143,15 +155,17 @@ main() { # {{{
|
|||
&& exit 0
|
||||
|
||||
is_maco_upgrade_require \
|
||||
&& prepare_host_for_upgrade \
|
||||
&& exit 0
|
||||
|
||||
is_maco_urgent_upgrade_require \
|
||||
&& prepare_host_for_upgrade \
|
||||
&& exit 0
|
||||
|
||||
}
|
||||
# }}}
|
||||
|
||||
# Manage arguments {{{
|
||||
# Manage arguments # {{{
|
||||
# This code can't be in a function due to arguments
|
||||
|
||||
if [ ! "${NBARGS}" -eq "0" ]; then
|
||||
|
|
Loading…
Reference in New Issue