-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 В Sun, 01 Mar 2015 08:30:29 +0100 Johannes Kastl <mail@ojkastl.de> пишет:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 01.03.2015 Andrei Borzenkov wrote:
No. For oneshot services systemd starts service and waits until it is finishes before continuing with any other service that depends on it.
And for notify it waits for the notify before starting other services. At least that is how I understood Cristian's statement.
It is difference between starting long running background services and doing one time job.
What is confusing here?
I'll try to get this straight:
With oneshot, systemd waits for the task to *exit* before starting other services that Require/Want/After this task.
With notify, systemd waits until it gets notified before starting these tasks.
Right so far?
In my use case, a long running backup, I could do the notify at the end, when my backup is finished. But the end result would be the same, the following tasks would start when my backup is finished.
So I do not see the advantage of using one over the other.
"oneshot" does not require useless program modification and conveys clear meaning that this is one time job. Otherwise as usual there are many ways to skin a cat. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlTyxeIACgkQR6LMutpd94zRSACePZnhofkVtZMLfALqyGS/LwME Y9wAoJINVuM3H1S1z7TE2dz8cuIX+eCG =H2Nm -----END PGP SIGNATURE-----