Systemd/src/systemctl
Filipe Brandenburger adb6cd9be2 systemctl: add support for --wait to is-system-running
This makes it possible to wait until boot is finished without having to poll
for this command repeatedly, instead using the syntax:

  $ systemctl is-system-running --wait

Waiting is implemented by waiting for the StartupFinished signal to be posted
on the bus.

Register the matcher before checking for the property to avoid race conditions.

Tested by artificially delaying startup with a oneshot service and calling this
command, checked that it emitted `running` and exited with a 0 return code as
soon as the delay service completed startup.

Also tested that booting to degraded state unblocks the command.

Inserted a delay between getting the property and waiting for the signal and
confirmed this seems to work free of race conditions.

Updated the --help text (under --wait) and the man page to document the new
feature.
2018-08-07 09:33:25 +02:00
..
systemctl.c systemctl: add support for --wait to is-system-running 2018-08-07 09:33:25 +02:00
systemd-sysv-install.SKELETON systemd-sysv-install: unset ROOT rather than setting it to "" 2018-02-27 19:59:09 +01:00