Bug 66926

Summary: RFE: a command to figure out if boot up has been completed or not
Product: systemd Reporter: Umut Tezduyar <umut>
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Umut Tezduyar 2013-07-15 13:20:59 UTC
There is no easy polling way to determine if system has booted up or not. 

while (systemctl is-active default.target == false)
   print "Still booting.."

systemctl list-jobs can be used to figure out if there are jobs left or not but the output of systemctl list-jobs is for humans. One thing could be printing out the number of ongoing jobs with "--quit" option..

ex: systemctl --quit list-jobs; echo $? > 0

Note: Yes, I am aware of the Manager interface's dbus signal sent out when boot up is completed.
Comment 1 Lennart Poettering 2014-06-25 10:23:50 UTC
We have a global system state now which "systemctl status" without parameters shows now.

You can also dump it like this:

systemctl show -p SystemState

If it is shown as "running" then the system is fully started up. This should cover what is necessary.
Comment 2 Lennart Poettering 2014-06-25 10:32:05 UTC
A well, I also added a high-level "systemctl is-system-running" command for this now to git.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.