From b9dac418372401742609bd600f05267ae3a724de Mon Sep 17 00:00:00 2001 From: Eric Curtin Date: Mon, 17 Apr 2023 22:09:24 +0100 Subject: Support /etc/system-update for OSTree systems This is required when / is immutable and cannot be written at runtime. Co-authored-by: Richard Hughes --- man/systemd.offline-updates.xml | 46 +++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 20 deletions(-) (limited to 'man/systemd.offline-updates.xml') diff --git a/man/systemd.offline-updates.xml b/man/systemd.offline-updates.xml index 6706451766..7285f9e263 100644 --- a/man/systemd.offline-updates.xml +++ b/man/systemd.offline-updates.xml @@ -40,18 +40,20 @@ - When the user OK'ed the update, the symlink /system-update is - created that points to /var/lib/system-update (or - wherever the directory with the upgrade files is located) and the system is rebooted. This - symlink is in the root directory, since we need to check for it very early at boot, at a - time where /var/ is not available yet. + When the user OK'ed the update, the symlink /system-update or + /etc/system-update is created that points to + /var/lib/system-update (or wherever the directory with + the upgrade files is located) and the system is rebooted. This symlink is in the root + directory, since we need to check for it very early at boot, at a time where + /var/ is not available yet. Very early in the new boot systemd-system-update-generator8 - checks whether /system-update exists. If so, it (temporarily and for - this boot only) redirects (i.e. symlinks) default.target to + checks whether /system-update or + /etc/system-update exists. If so, it (temporarily and for this boot + only) redirects (i.e. symlinks) default.target to system-update.target, a special target that pulls in the base system (i.e. sysinit.target, so that all file systems are mounted but little else) and the system update units. @@ -68,12 +70,13 @@ As the first step, an update service should check if the - /system-update symlink points to the location used by that update - service. In case it does not exist or points to a different location, the service must exit - without error. It is possible for multiple update services to be installed, and for multiple - update services to be launched in parallel, and only the one that corresponds to the tool - that created the symlink before reboot should perform any actions. It - is unsafe to run multiple updates in parallel. + /system-update or /etc/system-update symlink + points to the location used by that update service. In case it does not exist or points to a + different location, the service must exit without error. It is possible for multiple update + services to be installed, and for multiple update services to be launched in parallel, and + only the one that corresponds to the tool that created the symlink + before reboot should perform any actions. It is unsafe to run multiple updates in + parallel. @@ -88,14 +91,16 @@ The update scripts should exit only after the update is finished. It is expected that the service which performs the update will cause the machine to reboot after it is done. If the system-update.target is successfully reached, i.e. - all update services have run, and the /system-update symlink still - exists, it will be removed and the machine rebooted as a safety measure. + all update services have run, and the /system-update or + /etc/system-update symlink still exists, it will be removed and + the machine rebooted as a safety measure. - After a reboot, now that the /system-update symlink is gone, - the generator won't redirect default.target anymore and the system - now boots into the default target again. + After a reboot, now that the /system-update and + /etc/system-update symlink is gone, the generator won't redirect + default.target anymore and the system now boots into the default + target again. @@ -115,8 +120,9 @@ - Make sure to remove the /system-update symlink as early as - possible in the update script to avoid reboot loops in case the update fails. + Make sure to remove the /system-update and + /etc/system-update symlinks as early as possible in the update + script to avoid reboot loops in case the update fails. -- cgit v1.2.1