** Description: ** Say we have /etc/systemd/system/mydisplaymanager@.service, that contains: [Install] Alias=display-manager.service I would find very useful that such a thing would work: # systemctl enable mydisplaymanager@myuser.service ln -sf '/etc/systemd/system/mydisplaymanager@myuser.service' '/etc/systemd/system/display-manager.service' The use case here is pretty obvious: it's a user-bound login manager. ** Present situation: ** # systemctl enable mydisplaymanager@myuser.service ln -sf '/etc/systemd/system/mydisplaymanager@.service' '/etc/systemd/system/display-manager.service' I tried creating the symlink by hand: # ln -sf '/etc/systemd/system/mydisplaymanager@myuser.service' '/etc/systemd/system/display-manager.service' And: # systemctl status display-manager.service display-manager.service Loaded: not-found (Reason: No such file or directory) Adrive: inactive (dead) Looking forward to this feature in v209!
+1 on this for me. I just encountered this issue where I keep my scripts and service/timer files in my Documents folder and simply want to link to the files in that folder. It would just make things easier to have the file linked so I can make changes to the file and have it reflected to a location that gets backed-up.
Nope, can't do that. We'd have a situation where the unit would both have an instance and not have an instance. This would confuse things to no end. That said, it is possible to link an instance name to a unit file outside of the unit search path, and then the symlink target can be arbitrary, it doesn't even have to be a valid unit name: $ ln -sf '/etc/systemd/system/mydisplaymanager@.service' '/etc/systemd/system/display-manager.service' → not OK $ cp /etc/systemd/system/mydisplaymanager@.service /etc/display_manager_service $ ln -s /etc/display_manager_service '/etc/systemd/system/display-manager.service' → OK
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.