diff --git a/man/systemd.offline-updates.xml b/man/systemd.offline-updates.xml index 07a5225512..22aa0354a8 100644 --- a/man/systemd.offline-updates.xml +++ b/man/systemd.offline-updates.xml @@ -86,34 +86,42 @@ - The system now continues to boot into default.target, and thus - into system-update.target. This target pulls in the system update unit, - which starts the system update script after all file systems have been mounted. + The system now continues to boot into default.target, and + thus into system-update.target. This target pulls in all system + update units. Only one service should perform an update (see the next point), and all + the other ones should exit cleanly with a "success" return code and without doing + anything. Update services should be ordered after sysinit.target + so that the update starts after after all file systems have been mounted. - As the first step, the update script should check if the + As the first step, an update service should check if the /system-update symlink points to the location used by that update - script. In case it does not exists or points to a different location, the script must exit + 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 scripts to be launched in parallel, and only the one that corresponds to the tool + 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. - The update script should now do its job. If applicable and possible, it should - create a file system snapshot, then install all packages. - After completion (regardless whether the update succeeded or failed) the machine - must be rebooted, for example by calling systemctl reboot. - In addition, on failure the script should revert to the old file system snapshot - (without the symlink). + The update service should now do its job. If applicable and possible, it should + create a file system snapshot, then install all packages. After completion (regardless + whether the update succeeded or failed) the machine must be rebooted, for example by + calling systemctl reboot. In addition, on failure the script should + revert to the old file system snapshot (without the symlink). - The system is rebooted. Since the /system-update symlink is gone, - the generator won't redirect default.target after reboot and the - system now boots into the default target again. + The upgrade scripts should exit only after the update is finished. It is expected + that the service which performs the upgrade will cause the machine to reboot after it + is done. + + + + 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. @@ -150,7 +158,8 @@ The update service should declare DefaultDependencies=false, - and pull in any services it requires explicitly. + Requires=sysinit.target, After=sysinit.target, + and explicitly pull in any other services it requires. diff --git a/man/systemd.special.xml b/man/systemd.special.xml index d977298cd8..de6a5ac6cd 100644 --- a/man/systemd.special.xml +++ b/man/systemd.special.xml @@ -609,14 +609,12 @@ system-update.target - A special target unit that is used for off-line system - updates. + A special target unit that is used for offline system updates. systemd-system-update-generator8 - will redirect the boot process to this target if - /system-update exists. For more - information see the System - Updates Specification. + will redirect the boot process to this target if /system-update + exists. For more information see + systemd.offline-updates7. + diff --git a/units/system-update.target b/units/system-update.target index 48d46fcbda..4054112c84 100644 --- a/units/system-update.target +++ b/units/system-update.target @@ -6,8 +6,8 @@ # (at your option) any later version. [Unit] -Description=System Update -Documentation=http://freedesktop.org/wiki/Software/systemd/SystemUpdates +Description=Offline System Update +Documentation=man:systemd.offline-updates(7) Documentation=man:systemd.special(7) man:systemd-system-update-generator(8) Requires=sysinit.target Conflicts=shutdown.target