Upgrade system
This commit is contained in:
parent
04b4befbc6
commit
c3cd76960c
|
@ -66,7 +66,7 @@ debug_message() { # {{{
|
||||||
|
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
is_apt_upgrade_absent() { # {{{
|
is_apt_upgrade_absent() { # {{{
|
||||||
|
|
||||||
## Check if temp APT upgrade file is absent
|
## Check if temp APT upgrade file is absent
|
||||||
if [ ! -f "${APT_TMP_FILE}" ]; then
|
if [ ! -f "${APT_TMP_FILE}" ]; then
|
||||||
|
@ -100,7 +100,7 @@ NO APT upgrade available for this system."
|
||||||
|
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
is_queue_enable() { # {{{
|
is_queue_enable() { # {{{
|
||||||
|
|
||||||
local_sge_hostname="${1}"
|
local_sge_hostname="${1}"
|
||||||
local_sge_queue_name="${2}"
|
local_sge_queue_name="${2}"
|
||||||
|
@ -134,7 +134,7 @@ state is: ${RED}${local_sge_queue_state:=/dev/null}${COLOR_DEBUG}."
|
||||||
|
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
is_job_running() { # {{{
|
is_job_running() { # {{{
|
||||||
|
|
||||||
local_sge_hostname="${1}"
|
local_sge_hostname="${1}"
|
||||||
## List SGE informations about the host
|
## List SGE informations about the host
|
||||||
|
@ -164,7 +164,7 @@ jobs running on ${local_sge_hostname} host: ${RED}${local_sge_slots_used}${COLOR
|
||||||
|
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
is_proc_running() { # {{{
|
is_proc_running() { # {{{
|
||||||
|
|
||||||
local_proc_pattern="${1}"
|
local_proc_pattern="${1}"
|
||||||
|
|
||||||
|
@ -185,6 +185,15 @@ procs running (with the pattern: ${RED}${local_proc_pattern}${COLOR_DEBUG}) on t
|
||||||
|
|
||||||
return "${return_proc_running}"
|
return "${return_proc_running}"
|
||||||
|
|
||||||
|
}
|
||||||
|
# }}}
|
||||||
|
upgrade_system() { # {{{
|
||||||
|
|
||||||
|
debug_message "upgrade_system − \
|
||||||
|
Try to apply APT upgrades".
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive aptitude -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold full-upgrade >> "${APT_TMP_FILE}" 2>&1
|
||||||
|
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
main() { # {{{
|
main() { # {{{
|
||||||
|
@ -218,9 +227,12 @@ main() { # {{{
|
||||||
is_proc_running "${maco_proc_pattern}" \
|
is_proc_running "${maco_proc_pattern}" \
|
||||||
&& exit 0
|
&& exit 0
|
||||||
|
|
||||||
|
## Try to upgrade the system
|
||||||
|
upgrade_system
|
||||||
|
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|
||||||
exit 0
|
exit 255
|
||||||
|
|
Loading…
Reference in New Issue