]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/manager.c
manager: rework sending of STATUS=
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 5 Jul 2021 10:25:23 +0000 (12:25 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 19 Jul 2021 09:36:25 +0000 (11:36 +0200)
commit6d9326595592f98e8126eacb4176acd8c3516d5c
tree98f6a9f7d447563708a0857ab1f8dd5df3360953
parent5f968096288ebdd9c3da3ddc309e1ad430884e86
manager: rework sending of STATUS=

We would send READY=1,STATUS="Startup finished in …" once after finishing
boot. This changes the message to just "Ready.". The time used to reach
readiness is not part of the ongoing status — it's just a bit of debug
information that it useful in some scenarious, but completely uninteresting
most of the time. Also, when we start sending status about other things in
subsequent patches, we can't really go back to showing "Startup finished in …"
later on. So let's just show "Ready." whenever we're in the steady state.

In manager_check_finished(), more steps are skipped if MANAGER_IS_FINISHED().
Those steps are idempotent, but no need to waste cycles trying to do them
more than once.

We'll now also check whether to send the status message whenever the job queue
runs empty. If we already sent the exact same message already, we'll not send
again.
src/core/manager.c
src/core/manager.h