summaryrefslogtreecommitdiffstats
path: root/src/basic/login-util.h
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2023-10-19 14:58:03 +0200
committerLuca Boccassi <bluca@debian.org>2023-10-20 12:45:37 +0200
commit665a3d6d15c09428debcabd46e8a2e27afc51a46 (patch)
tree7fdccbd221cba5c7ff3b5be87161897012119c0f /src/basic/login-util.h
parentman: mention that inhibit blocks soft-reboot too (diff)
downloadsystemd-665a3d6d15c09428debcabd46e8a2e27afc51a46.tar.xz
systemd-665a3d6d15c09428debcabd46e8a2e27afc51a46.zip
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.
Diffstat (limited to 'src/basic/login-util.h')
-rw-r--r--src/basic/login-util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/basic/login-util.h b/src/basic/login-util.h
index 613fb0f86f..4c9cae0f4f 100644
--- a/src/basic/login-util.h
+++ b/src/basic/login-util.h
@@ -7,11 +7,12 @@
#define SD_LOGIND_ROOT_CHECK_INHIBITORS (UINT64_C(1) << 0)
#define SD_LOGIND_REBOOT_VIA_KEXEC (UINT64_C(1) << 1)
#define SD_LOGIND_SOFT_REBOOT (UINT64_C(1) << 2)
+#define SD_LOGIND_SOFT_REBOOT_IF_NEXTROOT_SET_UP (UINT64_C(1) << 3)
/* For internal use only */
#define SD_LOGIND_INTERACTIVE (UINT64_C(1) << 63)
-#define SD_LOGIND_SHUTDOWN_AND_SLEEP_FLAGS_PUBLIC (SD_LOGIND_ROOT_CHECK_INHIBITORS|SD_LOGIND_REBOOT_VIA_KEXEC|SD_LOGIND_SOFT_REBOOT)
+#define SD_LOGIND_SHUTDOWN_AND_SLEEP_FLAGS_PUBLIC (SD_LOGIND_ROOT_CHECK_INHIBITORS|SD_LOGIND_REBOOT_VIA_KEXEC|SD_LOGIND_SOFT_REBOOT|SD_LOGIND_SOFT_REBOOT_IF_NEXTROOT_SET_UP)
#define SD_LOGIND_SHUTDOWN_AND_SLEEP_FLAGS_ALL (SD_LOGIND_SHUTDOWN_AND_SLEEP_FLAGS_PUBLIC|SD_LOGIND_INTERACTIVE)
bool session_id_valid(const char *id);