]> git.ipfire.org Git - thirdparty/systemd.git/commit
pid1: add "soft-reboot" reboot method
authorLennart Poettering <lennart@poettering.net>
Thu, 27 Apr 2023 15:23:18 +0000 (17:23 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 2 Jun 2023 14:49:38 +0000 (16:49 +0200)
commit13ffc60749df0ca7c76cfcac317b41a05679b364
tree4d6950e83bf28fcc39b04f9d37816993187b6a89
parent8f9a307fec6e90bec6f834effd68de500d3b85b4
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)
13 files changed:
src/basic/special.h
src/core/dbus-manager.c
src/core/emergency-action.c
src/core/emergency-action.h
src/core/main.c
src/core/manager.c
src/core/manager.h
src/shared/switch-root.c
src/shared/switch-root.h
src/shutdown/shutdown.c
units/meson.build
units/soft-reboot.target [new file with mode: 0644]
units/systemd-soft-reboot.service [new file with mode: 0644]