mirror of
https://github.com/systemd/systemd.git
synced 2024-11-08 11:27:32 +03:00
logind: avoid a dot before parenthesis
systemd-logind[27]: System is rebooting. (Applied kernel updates.) is changed to systemd-logind[27]: System is rebooting (Applied kernel updates). Users should not add a dot in the sentence in --message, i.e. the correct usage is now: $ systemctl reboot --message "Applied kernel updates"
This commit is contained in:
parent
9dc5db34ad
commit
f868cb58c1
@ -1352,24 +1352,26 @@ static int bus_manager_log_shutdown(
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (streq(unit_name, SPECIAL_POWEROFF_TARGET)) {
|
if (streq(unit_name, SPECIAL_POWEROFF_TARGET)) {
|
||||||
p = "MESSAGE=System is powering down.";
|
p = "MESSAGE=System is powering down";
|
||||||
q = "SHUTDOWN=power-off";
|
q = "SHUTDOWN=power-off";
|
||||||
} else if (streq(unit_name, SPECIAL_HALT_TARGET)) {
|
} else if (streq(unit_name, SPECIAL_HALT_TARGET)) {
|
||||||
p = "MESSAGE=System is halting.";
|
p = "MESSAGE=System is halting";
|
||||||
q = "SHUTDOWN=halt";
|
q = "SHUTDOWN=halt";
|
||||||
} else if (streq(unit_name, SPECIAL_REBOOT_TARGET)) {
|
} else if (streq(unit_name, SPECIAL_REBOOT_TARGET)) {
|
||||||
p = "MESSAGE=System is rebooting.";
|
p = "MESSAGE=System is rebooting";
|
||||||
q = "SHUTDOWN=reboot";
|
q = "SHUTDOWN=reboot";
|
||||||
} else if (streq(unit_name, SPECIAL_KEXEC_TARGET)) {
|
} else if (streq(unit_name, SPECIAL_KEXEC_TARGET)) {
|
||||||
p = "MESSAGE=System is rebooting with kexec.";
|
p = "MESSAGE=System is rebooting with kexec";
|
||||||
q = "SHUTDOWN=kexec";
|
q = "SHUTDOWN=kexec";
|
||||||
} else {
|
} else {
|
||||||
p = "MESSAGE=System is shutting down.";
|
p = "MESSAGE=System is shutting down";
|
||||||
q = NULL;
|
q = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isempty(m->wall_message))
|
if (isempty(m->wall_message))
|
||||||
p = strjoina(p, " (", m->wall_message, ")");
|
p = strjoina(p, ".");
|
||||||
|
else
|
||||||
|
p = strjoina(p, " (", m->wall_message, ").");
|
||||||
|
|
||||||
return log_struct(LOG_NOTICE,
|
return log_struct(LOG_NOTICE,
|
||||||
LOG_MESSAGE_ID(SD_MESSAGE_SHUTDOWN),
|
LOG_MESSAGE_ID(SD_MESSAGE_SHUTDOWN),
|
||||||
|
Loading…
Reference in New Issue
Block a user