add live_system config option

This is to be used in environments where reboot is strictly unneeded;
such as when building packages in a chroot
This commit is contained in:
Fredrik Eriksson 2024-07-25 19:25:12 +02:00
parent 59e8fcc4e6
commit 2886e367b3
Signed by: feffe
GPG Key ID: E6B5580B853D322B
2 changed files with 7 additions and 0 deletions

View File

@ -115,6 +115,9 @@ def main():
log.error(f'Upgrade failed: {e}')
return 1
if not conf.getboolean('default', 'live_system', True):
return 0
if conf.getboolean('default', 'do_service_restart', fallback=True):
reboot_recommended = sau.services.restart_services()

View File

@ -12,6 +12,10 @@
# 1.0.1 -> 1.0.1.1 (3)
version_sensitivity=1
# Set to no if you're using sau in an environment where running processes
# shouldn't be touched and reboots shouldn't be done, for example in chroots
live_system=yes
# sau can reboot on system upgrades (FreeBSD) or if the service restarts does
# not close all deleted files (any platform)
do_reboot=no