systemctl: automatically softreboot/kexec if set up on reboot
Automatically softreboot if the nextroot has been set up with an OS tree, or automatically kexec if a kernel has been loaded with kexec --load. Add SYSTEMCTL_SKIP_AUTO_KEXEC and SYSTEMCTL_SKIP_AUTO_SOFT_REBOOT to skip the automated switchover.
This commit is contained in:
@@ -133,9 +133,10 @@ elif [ -f /run/testsuite82.touch ]; then
|
||||
# Restart the unit that is not supposed to survive
|
||||
systemd-run --collect --service-type=exec --unit=testsuite-82-nosurvive.service sleep infinity
|
||||
|
||||
# Now issue the soft reboot. We should be right back soon.
|
||||
# Now issue the soft reboot. We should be right back soon. Given /run/nextroot exists, we should
|
||||
# automatically do a softreboot instead of normal reboot.
|
||||
touch /run/testsuite82.touch2
|
||||
systemctl --no-block soft-reboot
|
||||
systemctl --no-block reboot
|
||||
|
||||
# Now block until the soft-boot killing spree kills us
|
||||
exec sleep infinity
|
||||
|
||||
Reference in New Issue
Block a user