Red Hat Bugzilla – Bug 809132
RFE: run as "last" service
Last modified: 2013-07-25 21:13:31 EDT
I wonder if you could add into units possibility to run service as the "last" one. The cron daemon with sysvinit was started as last, because all previous services could be run by cron. Now I don't know how to do it.
Would it be possible to write into After=*.service ? I guess such command would be useful for admins on their servers too.
Could you describe the use case in more detail? Could give a specific example where a problem resulting from not starting cron as the last service can be demonstrated?
I doubt that ordering dependencies of the "after everything else" kind would be accepted. Lennart has written several times that a "last" service is a misguided concept (e.g.: http://lists.freedesktop.org/archives/systemd-devel/2011-March/001417.html).
Ok, I thought so :)
Never mind, is it better solution for my problem then put all possible services into my unit? I see the biggest problem in installation of 3rd party daemons, where I don't know their name.
This bug was based on #807029.
One option could be to have "After=systemd-user-sessions.service" in crond.service, based on the idea that since the users could at that point login and run whatever commands they like, their cron jobs should be able to run as well.
(The explicit ordering to ypbind.service would not be needed then, because ypbind.service already declares "Before=systemd-user-session.service". Perhaps sssd.service should do that too, I don't know.)
So, I will close this now, as i think the concept is really flawed, and we really shouldn't implement anything new here. There already are a number of options that are "close enough", like ordering after multi-user.target or graphical.target or default.target, and they do not result in ambiguities when multiple services which need this are around.