diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-04-27 17:23:18 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-06-02 16:49:38 +0200 |
commit | 13ffc60749df0ca7c76cfcac317b41a05679b364 (patch) | |
tree | 4d6950e83bf28fcc39b04f9d37816993187b6a89 /units/soft-reboot.target | |
parent | Merge pull request #27849 from DaanDeMeyer/sign-pcr (diff) | |
download | systemd-13ffc60749df0ca7c76cfcac317b41a05679b364.tar.xz systemd-13ffc60749df0ca7c76cfcac317b41a05679b364.zip |
pid1: add "soft-reboot" reboot method
This adds a new mechanism for rebooting, a form of "userspace reboot"
hereby dubbed "soft-reboot". It will stop all services as in a usual
shutdown, possibly transition into a new root fs and then issue a fresh
initial transaction. The kernel is not replaced.
File descriptors can be passed over, thus opening the door for leaving
certain resources around between such reboots.
Usecase: this is an extremely quick way to reset userspace fully when
updating image based systems, without going through a full
hardware/firmware/boot loader/kernel/initrd cycle. It minimizes "grayout time"
for OS updates. (In particular when combined with kernel live patching)
Diffstat (limited to 'units/soft-reboot.target')
-rw-r--r-- | units/soft-reboot.target | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/units/soft-reboot.target b/units/soft-reboot.target new file mode 100644 index 0000000000..6a6c772875 --- /dev/null +++ b/units/soft-reboot.target @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Reboot System Userspace +Documentation=man:systemd.special(7) +DefaultDependencies=no +Requires=systemd-soft-reboot.service +After=systemd-soft-reboot.service +AllowIsolate=yes +JobTimeoutSec=30min +JobTimeoutAction=soft-reboot-force |