diff --git a/bin/sau b/bin/sau index 8f6f37d..6a0605f 100755 --- a/bin/sau +++ b/bin/sau @@ -16,10 +16,19 @@ def main(): conf = sau.config log = logging.getLogger(sau.LOGNAME) platform = sau.platforms.get_platform() - reboot_required = platform.system_upgrade() - platform.pkg_upgrade() - reboot_recommended = sau.services.restart_services() + reboot_required = False + reboot_recommended = False + + if conf.getboolean('default', 'do_system_upgrade', fallback=True): + reboot_required = platform.system_upgrade() + + if conf.getboolean('default', 'do_package_upgrade', fallback=True): + platform.pkg_upgrade() + + if conf.getboolean('default', 'do_service_restart', fallback=True): + reboot_recommended = sau.services.restart_services() + if conf.getboolean('default', 'do_reboot', fallback=False): if reboot_required: log.warning('Rebooting because of a system upgrade') diff --git a/config.cfg b/config.cfg index 84daa64..c3b1843 100644 --- a/config.cfg +++ b/config.cfg @@ -16,6 +16,10 @@ min_version_diff=2 # not close all deleted files (any platform) do_reboot=no +do_system_upgrade=yes +do_package_upgrade=yes +do_service_restart=yes + # The packages section contains = pairs to override the # default min_version_diff. Note that package naming may differ depending on