mirror of
https://github.com/systemd/systemd.git
synced 2025-01-24 06:04:05 +03:00
manager: if we receive SIGRTMIN+20/21 enable/disable showing of status on the console
This commit is contained in:
parent
be0396695b
commit
0658666bac
@ -720,6 +720,63 @@
|
||||
<command>systemctl start
|
||||
reboot.target</command>.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>SIGRTMIN+6</term>
|
||||
|
||||
<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>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>SIGRTMIN+13</term>
|
||||
|
||||
<listitem><para>Immediately halts the machine.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>SIGRTMIN+14</term>
|
||||
|
||||
<listitem><para>Immediately powers off the machine.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>SIGRTMIN+15</term>
|
||||
|
||||
<listitem><para>Immediately reboots the machine.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>SIGRTMIN+16</term>
|
||||
|
||||
<listitem><para>Immediately reboots the machine with kexec.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>SIGRTMIN+20</term>
|
||||
|
||||
<listitem><para>Enables display of
|
||||
status messages on the console, as
|
||||
controlled via
|
||||
<varname>systemd.show_status=1</varname>
|
||||
on the kernel command
|
||||
line.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>SIGRTMIN+21</term>
|
||||
|
||||
<listitem><para>Disables display of
|
||||
status messages on the console, as
|
||||
controlled via
|
||||
<varname>systemd.show_status=0</varname>
|
||||
on the kernel command
|
||||
line.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
@ -174,6 +174,8 @@ static int manager_setup_signals(Manager *m) {
|
||||
SIGRTMIN+14, /* systemd: Immediate poweroff */
|
||||
SIGRTMIN+15, /* systemd: Immediate reboot */
|
||||
SIGRTMIN+16, /* systemd: Immediate kexec */
|
||||
SIGRTMIN+20, /* systemd: enable status messages */
|
||||
SIGRTMIN+21, /* systemd: disable status messages */
|
||||
-1);
|
||||
assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
|
||||
|
||||
@ -2177,7 +2179,21 @@ static int manager_process_signal_fd(Manager *m) {
|
||||
break;
|
||||
}
|
||||
|
||||
log_warning("Got unhandled signal <%s>.", strna(signal_to_string(sfsi.ssi_signo)));
|
||||
switch (sfsi.ssi_signo - SIGRTMIN) {
|
||||
|
||||
case 20:
|
||||
log_debug("Enabling showing of status.");
|
||||
m->show_status = true;
|
||||
break;
|
||||
|
||||
case 21:
|
||||
log_debug("Disabling showing of status.");
|
||||
m->show_status = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
log_warning("Got unhandled signal <%s>.", strna(signal_to_string(sfsi.ssi_signo)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user