added option to disable system- and package upgrade as well as service
restart
This commit is contained in:
parent
bdbad6084b
commit
50af5a9e4d
9
bin/sau
9
bin/sau
@ -16,10 +16,19 @@ def main():
|
|||||||
conf = sau.config
|
conf = sau.config
|
||||||
log = logging.getLogger(sau.LOGNAME)
|
log = logging.getLogger(sau.LOGNAME)
|
||||||
platform = sau.platforms.get_platform()
|
platform = sau.platforms.get_platform()
|
||||||
|
|
||||||
|
reboot_required = False
|
||||||
|
reboot_recommended = False
|
||||||
|
|
||||||
|
if conf.getboolean('default', 'do_system_upgrade', fallback=True):
|
||||||
reboot_required = platform.system_upgrade()
|
reboot_required = platform.system_upgrade()
|
||||||
|
|
||||||
|
if conf.getboolean('default', 'do_package_upgrade', fallback=True):
|
||||||
platform.pkg_upgrade()
|
platform.pkg_upgrade()
|
||||||
|
|
||||||
|
if conf.getboolean('default', 'do_service_restart', fallback=True):
|
||||||
reboot_recommended = sau.services.restart_services()
|
reboot_recommended = sau.services.restart_services()
|
||||||
|
|
||||||
if conf.getboolean('default', 'do_reboot', fallback=False):
|
if conf.getboolean('default', 'do_reboot', fallback=False):
|
||||||
if reboot_required:
|
if reboot_required:
|
||||||
log.warning('Rebooting because of a system upgrade')
|
log.warning('Rebooting because of a system upgrade')
|
||||||
|
@ -16,6 +16,10 @@ min_version_diff=2
|
|||||||
# not close all deleted files (any platform)
|
# not close all deleted files (any platform)
|
||||||
do_reboot=no
|
do_reboot=no
|
||||||
|
|
||||||
|
do_system_upgrade=yes
|
||||||
|
do_package_upgrade=yes
|
||||||
|
do_service_restart=yes
|
||||||
|
|
||||||
|
|
||||||
# The packages section contains <package>=<version_diff> pairs to override the
|
# The packages section contains <package>=<version_diff> pairs to override the
|
||||||
# default min_version_diff. Note that package naming may differ depending on
|
# default min_version_diff. Note that package naming may differ depending on
|
||||||
|
Loading…
Reference in New Issue
Block a user