Bug 809132 - RFE: run as "last" service
RFE: run as "last" service
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
rawhide
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks: systemd-RFE
  Show dependency treegraph
 
Reported: 2012-04-02 10:47 EDT by Marcela Mašláňová
Modified: 2013-07-25 21:13 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-25 21:13:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Marcela Mašláňová 2012-04-02 10:47:22 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.
Comment 1 Michal Schmidt 2012-04-02 11:24:19 EDT
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).
Comment 2 Marcela Mašláňová 2012-04-02 14:32:40 EDT
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.
Comment 3 Michal Schmidt 2012-04-03 11:32:46 EDT
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.)
Comment 4 Lennart Poettering 2013-07-25 21:13:31 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.