Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
systemctl: add support for --wait to is-system-running #9796
This makes it possible to wait until boot is finished without having to poll for this command repeatedly, instead using the syntax:
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
keszybz left a comment
I think this is reasonable as is. The timeout doesn't seem to be strictly necessary: if this command is invoked from a script in another unit, that unit will be subject to timeout anyway, so no timing in the command itself is OK.
Please take another look.