<para>systemd user managers will start the
<filename>exit.target</filename> unit when this signal is
received. This is mostly equivalent to <command>systemctl
- --user start exit.target</command>.</para></listitem>
+ --user start exit.target
+ --job-mode=replace-irreversible</command>.</para></listitem>
</varlistentry>
<varlistentry>
<listitem><para>Upon receiving this signal the systemd system
manager will start the
<filename>ctrl-alt-del.target</filename> unit. This is mostly
- equivalent to <command>systemctl start
- ctl-alt-del.target</command>. If this signal is received more
- than 7 times per 2s, an immediate reboot is triggered.
- Note that pressing Ctrl-Alt-Del on the console will trigger
- this signal. Hence, if a reboot is hanging, pressing
- Ctrl-Alt-Del more than 7 times in 2s is a relatively safe way
- to trigger an immediate reboot.</para>
+ equivalent to <command>systemctl start ctl-alt-del.target
+ --job-mode=replace-irreversible</command>. If this signal is
+ received more than 7 times per 2s, an immediate reboot is
+ triggered. Note that pressing Ctrl-Alt-Del on the console
+ will trigger this signal. Hence, if a reboot is hanging,
+ pressing Ctrl-Alt-Del more than 7 times in 2s is a relatively
+ safe way to trigger an immediate reboot.</para>
<para>systemd user managers treat this signal the same way as
<constant>SIGTERM</constant>.</para></listitem>
<listitem><para>Enters default mode, starts the
<filename>default.target</filename> unit. This is mostly
- equivalent to <command>systemctl start
+ equivalent to <command>systemctl isolate
default.target</command>.</para></listitem>
</varlistentry>
<listitem><para>Halts the machine, starts the
<filename>halt.target</filename> unit. This is mostly
- equivalent to <command>systemctl start
- halt.target</command>.</para></listitem>
+ equivalent to <command>systemctl start halt.target
+ --job-mode=replace-irreversible</command>.</para>
+ </listitem>
</varlistentry>
<varlistentry>
<listitem><para>Powers off the machine, starts the
<filename>poweroff.target</filename> unit. This is mostly
- equivalent to <command>systemctl start
- poweroff.target</command>.</para></listitem>
+ equivalent to <command>systemctl start poweroff.target
+ --job-mode=replace-irreversible</command>.</para>
+ </listitem>
</varlistentry>
<varlistentry>
<listitem><para>Reboots the machine, starts the
<filename>reboot.target</filename> unit. This is mostly
- equivalent to <command>systemctl start
- reboot.target</command>.</para></listitem>
+ equivalent to <command>systemctl start reboot.target
+ --job-mode=replace-irreversible</command>.</para>
+ </listitem>
</varlistentry>
<varlistentry>
<listitem><para>Reboots the machine via kexec, starts the
<filename>kexec.target</filename> unit. This is mostly
- equivalent to <command>systemctl start
- kexec.target</command>.</para></listitem>
+ equivalent to <command>systemctl start kexec.target
+ --job-mode=replace-irreversible</command>.</para>
+ </listitem>
</varlistentry>
<varlistentry>
if (MANAGER_IS_SYSTEM(m))
manager_handle_ctrl_alt_del(m);
else
- manager_start_target(m, SPECIAL_EXIT_TARGET, JOB_REPLACE);
+ manager_start_target(m, SPECIAL_EXIT_TARGET,
+ JOB_REPLACE_IRREVERSIBLY);
break;
case SIGWINCH:
default: {
/* Starting SIGRTMIN+0 */
- static const char * const target_table[] = {
- [0] = SPECIAL_DEFAULT_TARGET,
- [1] = SPECIAL_RESCUE_TARGET,
- [2] = SPECIAL_EMERGENCY_TARGET,
- [3] = SPECIAL_HALT_TARGET,
- [4] = SPECIAL_POWEROFF_TARGET,
- [5] = SPECIAL_REBOOT_TARGET,
- [6] = SPECIAL_KEXEC_TARGET
+ static const struct {
+ const char *target;
+ JobMode mode;
+ } target_table[] = {
+ [0] = { SPECIAL_DEFAULT_TARGET, JOB_ISOLATE },
+ [1] = { SPECIAL_RESCUE_TARGET, JOB_ISOLATE },
+ [2] = { SPECIAL_EMERGENCY_TARGET, JOB_ISOLATE },
+ [3] = { SPECIAL_HALT_TARGET, JOB_REPLACE_IRREVERSIBLY },
+ [4] = { SPECIAL_POWEROFF_TARGET, JOB_REPLACE_IRREVERSIBLY },
+ [5] = { SPECIAL_REBOOT_TARGET, JOB_REPLACE_IRREVERSIBLY },
+ [6] = { SPECIAL_KEXEC_TARGET, JOB_REPLACE_IRREVERSIBLY }
};
/* Starting SIGRTMIN+13, so that target halt and system halt are 10 apart */
if ((int) sfsi.ssi_signo >= SIGRTMIN+0 &&
(int) sfsi.ssi_signo < SIGRTMIN+(int) ELEMENTSOF(target_table)) {
int idx = (int) sfsi.ssi_signo - SIGRTMIN;
- manager_start_target(m, target_table[idx],
- (idx == 1 || idx == 2) ? JOB_ISOLATE : JOB_REPLACE);
+ manager_start_target(m, target_table[idx].target,
+ target_table[idx].mode);
break;
}