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:
@@ -1090,10 +1090,7 @@ int systemctl_dispatch_parse_argv(int argc, char *argv[]) {
|
||||
return halt_parse_argv(argc, argv);
|
||||
|
||||
} else if (invoked_as(argv, "reboot")) {
|
||||
if (kexec_loaded())
|
||||
arg_action = ACTION_KEXEC;
|
||||
else
|
||||
arg_action = ACTION_REBOOT;
|
||||
arg_action = ACTION_REBOOT;
|
||||
return halt_parse_argv(argc, argv);
|
||||
|
||||
} else if (invoked_as(argv, "shutdown")) {
|
||||
|
||||
Reference in New Issue
Block a user