| Summary: | can't start service in only multi-user.target | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Daniel Belton <danielbelton> |
| Component: | systemd | Assignee: | Lennart Poettering <lpoetter> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 15 | CC: | johannbg, lpoetter, metherid, mschmidt, notting, plautrba |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-03-28 13:23:23 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Daniel Belton
2011-03-26 18:33:53 UTC
I am trying to have services that start in multi-user.target without being started by graphical.target. In other words, I want services to start in the old runlevel 3 but not start in the old runlevel 5. If services are started in multi-user.target (old runlevel 3) then they will get started by graphical.target (old runlevel 5) as well. You can define your own target, pull in multi-user.target (add "Requires=multi-user.target" and "After=multi-user.target") and then pull additional services using links in /etc/systemd/system/$YOUROWN.target.wants/. Would that do what you want? anything added to multi-user.target would also be pulled in by graphical.target. So, what you are saying might work If I created a new target, have it pull in multi-user.target but put the services I want added in the new target. I believe I would then need to set the new target I create as the new default as well by using: ln -sf /lib/systemd/system/new.target /etc/systemd/system/default.target or specify it on the kernel line if I didn't want to change the default. Am going to mark this as closed since systemd seems to work as designed in this case. There is a work-around to accomplish what I wish to do as mentioned above, even if you have to do something totally strange to get it done. You may also be able to, for a service 'foo' that you don't want to start in graphical target, do: ln -s /dev/null /etc/systemd/system/graphical.target.wants/foo.service. |