core: do not "warn" about mundane emergency actions
For example in a container we'd log: Oct 17 17:01:10 rawhide systemd[1]: Started Power-Off. Oct 17 17:01:10 rawhide systemd[1]: Forcibly powering off: unit succeeded Oct 17 17:01:10 rawhide systemd[1]: Reached target Power-Off. Oct 17 17:01:10 rawhide systemd[1]: Shutting down. and on the console we'd write (in red) [ !! ] Forcibly powering off: unit succeeded This is not useful in any way, and the fact that we're calling an "emergency action" is an internal implementation detail. Let's log about c-a-d and the watchdog actions only.
This commit is contained in:
+1
-1
@@ -2538,7 +2538,7 @@ static void manager_handle_ctrl_alt_del(Manager *m) {
|
||||
if (ratelimit_below(&m->ctrl_alt_del_ratelimit) || m->cad_burst_action == EMERGENCY_ACTION_NONE)
|
||||
manager_start_target(m, SPECIAL_CTRL_ALT_DEL_TARGET, JOB_REPLACE_IRREVERSIBLY);
|
||||
else
|
||||
emergency_action(m, m->cad_burst_action, 0, NULL,
|
||||
emergency_action(m, m->cad_burst_action, EMERGENCY_ACTION_WARN, NULL,
|
||||
"Ctrl-Alt-Del was pressed more than 7 times within 2s");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user