Bug 809132 - RFE: run as "last" service
Summary: RFE: run as "last" service
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: systemd-RFE
TreeView+ depends on / blocked
 
Reported: 2012-04-02 14:47 UTC by Marcela Mašláňová
Modified: 2013-07-26 01:13 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-07-26 01:13:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 807029 0 unspecified CLOSED Cron should run after remote-fs 2021-02-22 00:41:40 UTC

Internal Links: 807029

Description Marcela Mašláňová 2012-04-02 14:47:22 UTC
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 15:24:19 UTC
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 18:32:40 UTC
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 15:32:46 UTC
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-26 01:13:31 UTC
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.