diff options
author | Luca Boccassi <bluca@debian.org> | 2023-10-19 14:58:03 +0200 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2023-10-20 12:45:37 +0200 |
commit | 665a3d6d15c09428debcabd46e8a2e27afc51a46 (patch) | |
tree | 7fdccbd221cba5c7ff3b5be87161897012119c0f /man | |
parent | man: mention that inhibit blocks soft-reboot too (diff) | |
download | systemd-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 'man')
-rw-r--r-- | man/org.freedesktop.login1.xml | 18 | ||||
-rw-r--r-- | man/systemctl.xml | 15 | ||||
-rw-r--r-- | man/systemd-soft-reboot.service.xml | 4 |
3 files changed, 30 insertions, 7 deletions
diff --git a/man/org.freedesktop.login1.xml b/man/org.freedesktop.login1.xml index 4a94656f66..954518992b 100644 --- a/man/org.freedesktop.login1.xml +++ b/man/org.freedesktop.login1.xml @@ -595,16 +595,20 @@ node /org/freedesktop/login1 { <function>SuspendThenHibernateWithFlags()</function> add <varname>flags</varname> to allow for extendability, defined as follows:</para> <programlisting> -#define SD_LOGIND_ROOT_CHECK_INHIBITORS (UINT64_C(1) << 0) -#define SD_LOGIND_KEXEC_REBOOT (UINT64_C(1) << 1) -#define SD_LOGIND_SOFT_REBOOT (UINT64_C(1) << 2) +#define SD_LOGIND_ROOT_CHECK_INHIBITORS (UINT64_C(1) << 0) +#define SD_LOGIND_KEXEC_REBOOT (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) </programlisting> <para>When the <varname>flags</varname> is 0 then these methods behave just like the versions without flags. When <constant>SD_LOGIND_ROOT_CHECK_INHIBITORS</constant> (0x01) is set, active inhibitors are - honoured for privileged users too. When <constant>SD_LOGIND_KEXEC_REBOOT</constant> (0x02) is set, then - <function>RebootWithFlags()</function> performs a kexec reboot if kexec kernel is loaded. When - <constant>SD_LOGIND_SOFT_REBOOT</constant> (0x04) is set, then <function>RebootWithFlags()</function> - performs a userspace reboot only.</para> + honoured for privileged users too. When <constant>SD_LOGIND_KEXEC_REBOOT</constant> (0x02) is set, + then <function>RebootWithFlags()</function> performs a kexec reboot if kexec kernel is loaded. When + <constant>SD_LOGIND_SOFT_REBOOT</constant> (0x04) is set, or + <constant>SD_LOGIND_SOFT_REBOOT_IF_NEXTROOT_SET_UP</constant> (0x08) is set and a new root file system + has been set up on <literal>/run/nextroot/</literal>, then <function>RebootWithFlags()</function> + performs a userspace reboot only. <constant>SD_LOGIND_SOFT_REBOOT_IF_NEXTROOT_SET_UP</constant> and + <constant>SD_LOGIND_KEXEC_REBOOT</constant> can be combined, with soft-reboot having precedence.</para> <para><function>SetRebootParameter()</function> sets a parameter for a subsequent reboot operation. See the description of <command>reboot</command> in diff --git a/man/systemctl.xml b/man/systemctl.xml index 419d4a8243..217010ca1c 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -1652,6 +1652,13 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err <para>This command honors <option>--force</option> and <option>--when=</option> in a similar way as <command>halt</command>.</para> + <para>If a new kernel has been loaded via <command>kexec --load</command>, a + <command>kexec</command> will be performed instead of a reboot, unless + <literal>SYSTEMCTL_SKIP_AUTO_KEXEC=1</literal> has been set. If a new root file system has + been setup on <literal>/run/nextroot</literal>, a <command>soft-reboot</command> will be + performed instead of a reboot, unless <literal>SYSTEMCTL_SKIP_AUTO_SOFT_REBOOT=1</literal> has + been set.</para> + <xi:include href="version-info.xml" xpointer="v246"/> </listitem> </varlistentry> @@ -1681,6 +1688,10 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err <para>This command honors <option>--force</option> and <option>--when=</option> similarly to <command>halt</command>.</para> + + <para>If a new kernel has been loaded via <command>kexec --load</command>, a + <command>kexec</command> will be performed when <command>reboot</command> is invoked, unless + <literal>SYSTEMCTL_SKIP_AUTO_KEXEC=1</literal> has been set.</para> </listitem> </varlistentry> @@ -1700,6 +1711,10 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err <citerefentry><refentrytitle>systemd-soft-reboot.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> for details.</para> + <para>If a new root file system has been setup on <literal>/run/nextroot</literal>, a + <command>soft-reboot</command> will be performed when <command>reboot</command> is invoked, + unless <literal>SYSTEMCTL_SKIP_AUTO_SOFT_REBOOT=1</literal> has been set.</para> + <xi:include href="version-info.xml" xpointer="v254"/> </listitem> </varlistentry> diff --git a/man/systemd-soft-reboot.service.xml b/man/systemd-soft-reboot.service.xml index 1de2fbc5f3..2419b86604 100644 --- a/man/systemd-soft-reboot.service.xml +++ b/man/systemd-soft-reboot.service.xml @@ -164,6 +164,10 @@ ExecStart=sleep infinity <para>Note that <filename>systemd-soft-reboot.service</filename> (and related units) should never be executed directly. Instead, trigger system shutdown with a command such as <literal>systemctl soft-reboot</literal>.</para> + + <para>Note that if a new root file system has been setup on <literal>/run/nextroot</literal>, a + <command>soft-reboot</command> will be performed when the <command>reboot</command> command is + invoked.</para> </refsect1> <refsect1> |