[systemd-devel] Has systemd booted up command

Umut Tezduyar umut at tezduyar.com
Thu Jul 18 01:08:47 PDT 2013


Hi,

This is in reference to
https://bugs.freedesktop.org/show_bug.cgi?id=66926 request.

I have been polling systemd with  "systemctl is-active default.target"
to detect if boot up has been completed or not. I have noticed that
this is not enough though.

It seems like starting a service that is not part of the initial job
tree can keep in state activating after default.target is reached. I
could use systemctl list-jobs to detect if there are still jobs
available but systemctl list-jobs's output is not meant for
programming.

Same problem happens when I switch targets. Currently I rely on
systemctl list-jobs output to detect if the target switch has been
completed or not.

What can we do about it?

One way would be having a command "systemctl job-count", other would
be having a command "systemctl has-booted" or something similar?

Any thoughts?


More information about the systemd-devel mailing list